@oomol-lab/open-flow 0.1.0-beta.39 → 0.1.0-beta.40
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/browser/codeDiagnostics-BtH_YuXu.js +44 -0
- package/dist/browser/{createResourceDialog-DnlKSqIs.js → createResourceDialog-BOrW62JW.js} +1 -1
- package/dist/browser/{dist-DYjIVIZC.js → dist-Cdna4VV_.js} +1 -1
- package/dist/browser/{dist-CeSZ2xSM.js → dist-DINmJ4Gr.js} +171 -112
- package/dist/browser/{editorComponent-T-GmTa-C.js → editorComponent-0skblWYk.js} +190 -107
- package/dist/browser/flow-authoring-node.d.ts +2 -5
- package/dist/browser/flow-authoring.js +111 -83
- package/dist/browser/flow-change-schema.d.ts +1 -1
- package/dist/browser/flow-change.d.ts +16 -5
- package/dist/browser/flow-change.js +196 -143
- package/dist/browser/{flowChanges-BXqN4jyH.js → flowChanges-3o9Vs_1I.js} +2479 -3906
- package/dist/browser/{flowWorkspace-a5QLISui.js → flowWorkspace-DJzQVVtZ.js} +12035 -10159
- package/dist/browser/{inputValues-Do4FrC_6.js → inputValues-DkDT6u0o.js} +1 -1
- package/dist/browser/{typeScriptSession-vC9uPDVV.js → typeScriptSession-v9Pb3G6d.js} +136 -136
- package/dist/browser/ui.css +1 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +0 -3
- package/dist/browser/workbench.js +1046 -1025
- package/dist/browser/{workbenchSelect-Dx2Y46cD.js → workbenchSelect-B5zXyaaX.js} +1116 -1063
- package/dist/common/connectorDecoders.d.ts +2 -1
- package/dist/common/control-api-conformance.js +1589 -1518
- package/dist/common/control-api.d.ts +18 -6
- package/dist/common/control-api.js +1470 -1392
- package/dist/common/control-requests.js +1550 -1535
- package/dist/common/draftOperations.d.ts +0 -1
- package/dist/common/flow-connectionUsage.d.ts +1 -1
- package/dist/common/flow-encoding.js +1092 -1060
- package/dist/common/flow-semantics.d.ts +1 -0
- package/dist/common/flow-semantics.js +2777 -2699
- package/dist/common/flowInspection.d.ts +1 -1
- package/dist/common/integration-trigger.js +350 -328
- package/dist/common/mcp.d.ts +27 -0
- package/dist/common/mcp.js +807 -728
- package/dist/common/poll-trigger.js +993 -971
- package/dist/common/provider-triggers.js +1521 -1203
- package/dist/common/runtime-contract.js +13 -6
- package/dist/common/scheduler.js +1430 -1408
- package/dist/common/trigger-catalog.d.ts +2 -1
- package/dist/common/webhook-trigger.js +221 -199
- package/dist/common/{zh-CN-D2od3TNw.js → zh-CN-CxZ3yYfR.js} +2 -2
- package/package.json +1 -1
package/dist/common/mcp.js
CHANGED
|
@@ -4561,23 +4561,38 @@ var qc = E(k([D({
|
|
|
4561
4561
|
})]), al = A(M, il), ol = {
|
|
4562
4562
|
inputs: E(k([Qc, $c])),
|
|
4563
4563
|
outputs: E(k([Zc, $c]))
|
|
4564
|
-
}, sl = k([
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
connectionId: M.optional(),
|
|
4568
|
-
connections: E(O({
|
|
4569
|
-
connectionId: M,
|
|
4570
|
-
alias: M.optional()
|
|
4571
|
-
}))
|
|
4572
|
-
}), O({
|
|
4573
|
-
kind: j("connector"),
|
|
4574
|
-
actionHints: E(M).optional(),
|
|
4575
|
-
connectionHints: E(O({
|
|
4564
|
+
}, sl = k([
|
|
4565
|
+
O({
|
|
4566
|
+
kind: j("connector"),
|
|
4576
4567
|
action: M,
|
|
4577
|
-
connectionId: M,
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4568
|
+
connectionId: M.optional(),
|
|
4569
|
+
connections: E(O({
|
|
4570
|
+
connectionId: M,
|
|
4571
|
+
alias: M.optional()
|
|
4572
|
+
}))
|
|
4573
|
+
}),
|
|
4574
|
+
O({
|
|
4575
|
+
kind: j("connector"),
|
|
4576
|
+
mode: j("shared")
|
|
4577
|
+
}),
|
|
4578
|
+
O({
|
|
4579
|
+
kind: j("connector"),
|
|
4580
|
+
mode: j("independent"),
|
|
4581
|
+
actions: E(O({
|
|
4582
|
+
action: M,
|
|
4583
|
+
connectionId: M.optional()
|
|
4584
|
+
}))
|
|
4585
|
+
}),
|
|
4586
|
+
O({
|
|
4587
|
+
kind: j("connector"),
|
|
4588
|
+
actionHints: E(M).optional(),
|
|
4589
|
+
connectionHints: E(O({
|
|
4590
|
+
action: M,
|
|
4591
|
+
connectionId: M,
|
|
4592
|
+
alias: M.optional()
|
|
4593
|
+
})).optional()
|
|
4594
|
+
})
|
|
4595
|
+
]), cl = D({
|
|
4581
4596
|
...ol,
|
|
4582
4597
|
name: M,
|
|
4583
4598
|
moduleId: M,
|
|
@@ -4774,7 +4789,7 @@ var qc = E(k([D({
|
|
|
4774
4789
|
D({
|
|
4775
4790
|
...yl,
|
|
4776
4791
|
kind: j("poll"),
|
|
4777
|
-
|
|
4792
|
+
connectionId: M.min(1).optional(),
|
|
4778
4793
|
config: A(M, rl),
|
|
4779
4794
|
definition: D({
|
|
4780
4795
|
..._l,
|
|
@@ -4785,7 +4800,7 @@ var qc = E(k([D({
|
|
|
4785
4800
|
D({
|
|
4786
4801
|
...yl,
|
|
4787
4802
|
kind: j("integration"),
|
|
4788
|
-
|
|
4803
|
+
connectionId: M.min(1).optional(),
|
|
4789
4804
|
config: A(M, rl),
|
|
4790
4805
|
definition: D({
|
|
4791
4806
|
..._l,
|
|
@@ -4811,7 +4826,7 @@ var qc = E(k([D({
|
|
|
4811
4826
|
nodes: A(M, xl),
|
|
4812
4827
|
edges: E(Cl).default([])
|
|
4813
4828
|
}), Dl = D({
|
|
4814
|
-
kind:
|
|
4829
|
+
kind: j("variable"),
|
|
4815
4830
|
target: M
|
|
4816
4831
|
}), Ol = D({
|
|
4817
4832
|
name: M,
|
|
@@ -4823,7 +4838,7 @@ var qc = E(k([D({
|
|
|
4823
4838
|
subflows: A(M, Tl.extend({ graph: El })),
|
|
4824
4839
|
tasks: A(M, dl)
|
|
4825
4840
|
}), Al = D({
|
|
4826
|
-
modelVersion: k([j(2), j(
|
|
4841
|
+
modelVersion: k([j(2), j(4)]),
|
|
4827
4842
|
document: kl,
|
|
4828
4843
|
modules: A(M, Ol)
|
|
4829
4844
|
});
|
|
@@ -4859,6 +4874,13 @@ var Ml = {
|
|
|
4859
4874
|
},
|
|
4860
4875
|
"graph.node.delete": wl,
|
|
4861
4876
|
"graph.node.field.set": k([
|
|
4877
|
+
D({
|
|
4878
|
+
...wl,
|
|
4879
|
+
kind: j("graph.node.field.set"),
|
|
4880
|
+
field: j("connectionId"),
|
|
4881
|
+
before: M.min(1).optional(),
|
|
4882
|
+
value: M.min(1).optional()
|
|
4883
|
+
}),
|
|
4862
4884
|
D({
|
|
4863
4885
|
...wl,
|
|
4864
4886
|
kind: j("graph.node.field.set"),
|
|
@@ -5188,30 +5210,27 @@ function Wl(e) {
|
|
|
5188
5210
|
}
|
|
5189
5211
|
function Gl(e) {
|
|
5190
5212
|
let t = F(e);
|
|
5191
|
-
|
|
5213
|
+
L(t, [
|
|
5192
5214
|
"accessRevision",
|
|
5193
5215
|
"bindings",
|
|
5194
|
-
..."nodeBindings" in t ? ["nodeBindings"] : [],
|
|
5195
5216
|
"mode",
|
|
5196
|
-
"
|
|
5217
|
+
"sharedAccessDigest",
|
|
5197
5218
|
..."providerIds" in t ? ["providerIds"] : [],
|
|
5198
5219
|
..."discardedBindingCount" in t ? ["discardedBindingCount"] : [],
|
|
5199
5220
|
"version"
|
|
5200
|
-
])
|
|
5201
|
-
let n = t.
|
|
5202
|
-
if (
|
|
5203
|
-
let r =
|
|
5204
|
-
if (
|
|
5205
|
-
let i = t.
|
|
5206
|
-
if (i
|
|
5207
|
-
let a =
|
|
5208
|
-
if (a < 0) return P();
|
|
5209
|
-
let o = [];
|
|
5221
|
+
]);
|
|
5222
|
+
let n = R(t.accessRevision);
|
|
5223
|
+
if (t.version != 1 || n < 0 || !Array.isArray(t.bindings) || "providerIds" in t && !Array.isArray(t.providerIds)) return P();
|
|
5224
|
+
let r = t.providerIds == null ? void 0 : t.providerIds.map((e) => I(e));
|
|
5225
|
+
if (r != null && new Set(r).size != r.length) return P();
|
|
5226
|
+
let i = t.discardedBindingCount == null ? 0 : R(t.discardedBindingCount);
|
|
5227
|
+
if (i < 0) return P();
|
|
5228
|
+
let a = [];
|
|
5210
5229
|
for (let e of t.bindings) try {
|
|
5211
|
-
|
|
5230
|
+
a.push(Ul(e, !1));
|
|
5212
5231
|
} catch (t) {
|
|
5213
5232
|
if (!(t instanceof Ll) || t.code != "response.invalid") throw t;
|
|
5214
|
-
typeof e == "object" && e && !Array.isArray(e) && typeof e.accessBindingId == "string" && e.accessBindingId.length > 0 && typeof e.providerId == "string" && e.providerId.length > 0 ?
|
|
5233
|
+
typeof e == "object" && e && !Array.isArray(e) && typeof e.accessBindingId == "string" && e.accessBindingId.length > 0 && typeof e.providerId == "string" && e.providerId.length > 0 ? a.push({
|
|
5215
5234
|
accessBindingId: e.accessBindingId,
|
|
5216
5235
|
providerId: e.providerId,
|
|
5217
5236
|
connectionId: null,
|
|
@@ -5219,20 +5238,66 @@ function Gl(e) {
|
|
|
5219
5238
|
status: "invalid",
|
|
5220
5239
|
connectionDisplayName: typeof e.connectionDisplayName == "string" && e.connectionDisplayName.length > 0 ? e.connectionDisplayName : typeof e.displayName == "string" && e.displayName.length > 0 ? e.displayName : e.providerId,
|
|
5221
5240
|
permissionGroupName: typeof e.permissionGroupName == "string" ? e.permissionGroupName : null
|
|
5222
|
-
}) :
|
|
5223
|
-
}
|
|
5224
|
-
return new Set(
|
|
5225
|
-
accessRevision:
|
|
5226
|
-
...
|
|
5227
|
-
...
|
|
5228
|
-
|
|
5229
|
-
bindings: o,
|
|
5241
|
+
}) : i++;
|
|
5242
|
+
}
|
|
5243
|
+
return new Set(a.map((e) => e.accessBindingId)).size == a.length ? {
|
|
5244
|
+
accessRevision: n,
|
|
5245
|
+
...i == 0 ? {} : { discardedBindingCount: i },
|
|
5246
|
+
...r == null ? {} : { providerIds: r },
|
|
5247
|
+
bindings: a,
|
|
5230
5248
|
mode: Wl(t.mode),
|
|
5231
|
-
|
|
5249
|
+
sharedAccessDigest: I(t.sharedAccessDigest),
|
|
5232
5250
|
version: 1
|
|
5233
5251
|
} : P();
|
|
5234
5252
|
}
|
|
5235
|
-
function Kl(e
|
|
5253
|
+
function Kl(e) {
|
|
5254
|
+
if (!Array.isArray(e)) return P();
|
|
5255
|
+
let t = e.map((e) => {
|
|
5256
|
+
let t = F(e);
|
|
5257
|
+
L(t, [
|
|
5258
|
+
"accessBindingId",
|
|
5259
|
+
"connectionId",
|
|
5260
|
+
"providerId",
|
|
5261
|
+
"source",
|
|
5262
|
+
"connectionDisplayName",
|
|
5263
|
+
..."permissionGroupName" in t ? ["permissionGroupName"] : []
|
|
5264
|
+
]);
|
|
5265
|
+
let n;
|
|
5266
|
+
try {
|
|
5267
|
+
n = Vl(t.source);
|
|
5268
|
+
} catch {
|
|
5269
|
+
return P();
|
|
5270
|
+
}
|
|
5271
|
+
return t.permissionGroupName != null && typeof t.permissionGroupName != "string" ? P() : {
|
|
5272
|
+
accessBindingId: I(t.accessBindingId),
|
|
5273
|
+
connectionId: I(t.connectionId),
|
|
5274
|
+
providerId: I(t.providerId),
|
|
5275
|
+
source: n,
|
|
5276
|
+
connectionDisplayName: I(t.connectionDisplayName),
|
|
5277
|
+
..."permissionGroupName" in t ? { permissionGroupName: t.permissionGroupName } : {}
|
|
5278
|
+
};
|
|
5279
|
+
});
|
|
5280
|
+
return new Set(t.map((e) => e.accessBindingId)).size == t.length ? t : P();
|
|
5281
|
+
}
|
|
5282
|
+
function ql(e) {
|
|
5283
|
+
let t = F(e);
|
|
5284
|
+
if (L(t, [
|
|
5285
|
+
"mode",
|
|
5286
|
+
"sharedAccessDigest",
|
|
5287
|
+
"sharedBindings",
|
|
5288
|
+
"selectedBindings",
|
|
5289
|
+
"version"
|
|
5290
|
+
]), t.version != 2) return P();
|
|
5291
|
+
let n = Wl(t.mode), r = Kl(t.sharedBindings), i = Kl(t.selectedBindings);
|
|
5292
|
+
return n == "implicit" && (r.length > 0 || i.length > 0) ? P() : {
|
|
5293
|
+
mode: n,
|
|
5294
|
+
sharedAccessDigest: I(t.sharedAccessDigest),
|
|
5295
|
+
sharedBindings: r,
|
|
5296
|
+
selectedBindings: i,
|
|
5297
|
+
version: 2
|
|
5298
|
+
};
|
|
5299
|
+
}
|
|
5300
|
+
function Jl(e, t) {
|
|
5236
5301
|
let n = F(e);
|
|
5237
5302
|
if (L(n, [
|
|
5238
5303
|
"candidates",
|
|
@@ -5248,13 +5313,13 @@ function Kl(e, t) {
|
|
|
5248
5313
|
version: 1
|
|
5249
5314
|
};
|
|
5250
5315
|
}
|
|
5251
|
-
function
|
|
5316
|
+
function Yl(e, t) {
|
|
5252
5317
|
let n = F(e);
|
|
5253
5318
|
if (L(n, ["results", "version"]), n.version != 1 || !Array.isArray(n.results)) return P();
|
|
5254
5319
|
let r = new Set(t), i = n.results.map((e) => {
|
|
5255
5320
|
let t = F(e), n = I(t.providerId);
|
|
5256
5321
|
if (!r.delete(n)) return P();
|
|
5257
|
-
if (!Object.hasOwn(t, "error")) return
|
|
5322
|
+
if (!Object.hasOwn(t, "error")) return Jl(t, n);
|
|
5258
5323
|
L(t, ["providerId", "error"]);
|
|
5259
5324
|
let i = F(t.error);
|
|
5260
5325
|
return L(i, ["code", "message"]), {
|
|
@@ -5270,7 +5335,7 @@ function ql(e, t) {
|
|
|
5270
5335
|
version: 1
|
|
5271
5336
|
} : P();
|
|
5272
5337
|
}
|
|
5273
|
-
function
|
|
5338
|
+
function Xl(e) {
|
|
5274
5339
|
let t = F(e);
|
|
5275
5340
|
if (L(t, [
|
|
5276
5341
|
...Object.hasOwn(t, "providerAccountId") ? ["providerAccountId"] : [],
|
|
@@ -5294,7 +5359,7 @@ function Jl(e) {
|
|
|
5294
5359
|
status: n
|
|
5295
5360
|
};
|
|
5296
5361
|
}
|
|
5297
|
-
function
|
|
5362
|
+
function Zl(e, t = !1) {
|
|
5298
5363
|
let n = F(e), r = n.description, i = t && Object.hasOwn(n, "value");
|
|
5299
5364
|
return L(n, [
|
|
5300
5365
|
"jsonSchema",
|
|
@@ -5308,13 +5373,13 @@ function Yl(e, t = !1) {
|
|
|
5308
5373
|
...i ? { value: Rl(n.value) } : {}
|
|
5309
5374
|
};
|
|
5310
5375
|
}
|
|
5311
|
-
function
|
|
5312
|
-
return
|
|
5376
|
+
function Ql(e) {
|
|
5377
|
+
return Zl(e, !0);
|
|
5313
5378
|
}
|
|
5314
|
-
function
|
|
5379
|
+
function $l(e, t) {
|
|
5315
5380
|
return Object.fromEntries(Object.entries(F(e)).map(([e, n]) => [e, t(n)]));
|
|
5316
5381
|
}
|
|
5317
|
-
function
|
|
5382
|
+
function eu(e) {
|
|
5318
5383
|
let t = F(e), n = t.homepageUrl, r = t.icon;
|
|
5319
5384
|
return L(t, [
|
|
5320
5385
|
"actionId",
|
|
@@ -5339,23 +5404,23 @@ function Ql(e) {
|
|
|
5339
5404
|
description: typeof t.description == "string" ? t.description : P(),
|
|
5340
5405
|
...n == null ? {} : { homepageUrl: n },
|
|
5341
5406
|
...r == null ? {} : { icon: r },
|
|
5342
|
-
inputs:
|
|
5407
|
+
inputs: $l(t.inputs, Ql),
|
|
5343
5408
|
name: I(t.name),
|
|
5344
|
-
outputs:
|
|
5409
|
+
outputs: $l(t.outputs, Zl),
|
|
5345
5410
|
serviceId: I(t.serviceId),
|
|
5346
5411
|
serviceName: I(t.serviceName)
|
|
5347
5412
|
};
|
|
5348
5413
|
}
|
|
5349
|
-
function
|
|
5350
|
-
let { defaultConnection: t, ...n } = F(e), r =
|
|
5414
|
+
function tu(e) {
|
|
5415
|
+
let { defaultConnection: t, ...n } = F(e), r = eu(n);
|
|
5351
5416
|
if (t == null) return r;
|
|
5352
|
-
let i =
|
|
5417
|
+
let i = Xl(t);
|
|
5353
5418
|
return i.serviceId != r.serviceId || i.status != "active" ? P() : {
|
|
5354
5419
|
...r,
|
|
5355
5420
|
defaultConnection: i
|
|
5356
5421
|
};
|
|
5357
5422
|
}
|
|
5358
|
-
function
|
|
5423
|
+
function nu(e) {
|
|
5359
5424
|
let t = F(e), n = t.homepageUrl, r = t.icon;
|
|
5360
5425
|
return t.noSetup !== void 0 && typeof t.noSetup != "boolean" || (L(t, [
|
|
5361
5426
|
...Object.hasOwn(t, "noSetup") ? ["noSetup"] : [],
|
|
@@ -5373,45 +5438,45 @@ function eu(e) {
|
|
|
5373
5438
|
}
|
|
5374
5439
|
//#endregion
|
|
5375
5440
|
//#region src/json-schema-subset/utils.ts
|
|
5376
|
-
var
|
|
5377
|
-
function
|
|
5378
|
-
let e =
|
|
5379
|
-
return
|
|
5441
|
+
var ru = 0;
|
|
5442
|
+
function iu() {
|
|
5443
|
+
let e = ru;
|
|
5444
|
+
return ru += 1, e;
|
|
5380
5445
|
}
|
|
5381
|
-
function
|
|
5446
|
+
function au(e) {
|
|
5382
5447
|
if (typeof e == "object" && e && !Object.isFrozen(e)) {
|
|
5383
|
-
for (let t of Object.getOwnPropertyNames(e))
|
|
5448
|
+
for (let t of Object.getOwnPropertyNames(e)) au(Reflect.get(e, t));
|
|
5384
5449
|
Object.freeze(e);
|
|
5385
5450
|
}
|
|
5386
5451
|
return e;
|
|
5387
5452
|
}
|
|
5388
|
-
function
|
|
5453
|
+
function ou(e, t) {
|
|
5389
5454
|
let n = {};
|
|
5390
5455
|
for (let r of t) r in e && (n[r] = e[r]);
|
|
5391
5456
|
return n;
|
|
5392
5457
|
}
|
|
5393
|
-
function
|
|
5458
|
+
function su(e) {
|
|
5394
5459
|
if (typeof e != "object" || !e) return e;
|
|
5395
5460
|
if (Array.isArray(e)) {
|
|
5396
5461
|
let t = [];
|
|
5397
|
-
for (let [n, r] of e.entries()) t[n] =
|
|
5462
|
+
for (let [n, r] of e.entries()) t[n] = su(r);
|
|
5398
5463
|
return t;
|
|
5399
5464
|
}
|
|
5400
5465
|
{
|
|
5401
5466
|
let t = {};
|
|
5402
|
-
for (let n in e) t[n] =
|
|
5467
|
+
for (let n in e) t[n] = su(e[n]);
|
|
5403
5468
|
return t;
|
|
5404
5469
|
}
|
|
5405
5470
|
}
|
|
5406
|
-
function
|
|
5471
|
+
function cu(e, t) {
|
|
5407
5472
|
if (e === t) return !0;
|
|
5408
5473
|
if (typeof e != "object" || !e || typeof e != typeof t) return !1;
|
|
5409
5474
|
if (Array.isArray(e)) {
|
|
5410
5475
|
if (!Array.isArray(t) || e.length !== t.length) return !1;
|
|
5411
|
-
for (let [n, r] of e.entries()) if (!
|
|
5476
|
+
for (let [n, r] of e.entries()) if (!cu(r, t[n])) return !1;
|
|
5412
5477
|
} else {
|
|
5413
5478
|
if (Array.isArray(t)) return !1;
|
|
5414
|
-
for (let n in e) if (!(n in t) || !
|
|
5479
|
+
for (let n in e) if (!(n in t) || !cu(e[n], t[n])) return !1;
|
|
5415
5480
|
for (let n in t) if (!(n in e)) return !1;
|
|
5416
5481
|
}
|
|
5417
5482
|
return !0;
|
|
@@ -5424,48 +5489,48 @@ var z = Object.freeze({
|
|
|
5424
5489
|
ContainedBy: 2,
|
|
5425
5490
|
Rejection: 3,
|
|
5426
5491
|
Intersection: 4
|
|
5427
|
-
}), B =
|
|
5492
|
+
}), B = gu(z.Equals), V = gu(z.Containing), H = gu(z.ContainedBy), U = gu(z.Rejection), W = gu(z.Intersection), lu = au([
|
|
5428
5493
|
[z.Equals, B],
|
|
5429
5494
|
[z.Containing, V],
|
|
5430
5495
|
[z.ContainedBy, H],
|
|
5431
5496
|
[z.Rejection, U],
|
|
5432
5497
|
[z.Intersection, W]
|
|
5433
|
-
]),
|
|
5498
|
+
]), uu = (() => {
|
|
5434
5499
|
let e = 0;
|
|
5435
|
-
for (let [t, n] of
|
|
5500
|
+
for (let [t, n] of lu) e |= n;
|
|
5436
5501
|
return e;
|
|
5437
5502
|
})();
|
|
5438
|
-
function
|
|
5503
|
+
function du(e) {
|
|
5439
5504
|
return !!(e & B);
|
|
5440
5505
|
}
|
|
5441
|
-
function
|
|
5506
|
+
function fu(e) {
|
|
5442
5507
|
return !!(e & V);
|
|
5443
5508
|
}
|
|
5444
|
-
function
|
|
5509
|
+
function pu(e) {
|
|
5445
5510
|
return !!(e & H);
|
|
5446
5511
|
}
|
|
5447
|
-
function
|
|
5512
|
+
function mu(e) {
|
|
5448
5513
|
return !!(e & U);
|
|
5449
5514
|
}
|
|
5450
|
-
function
|
|
5515
|
+
function hu(e) {
|
|
5451
5516
|
return !!(e & W);
|
|
5452
5517
|
}
|
|
5453
|
-
function
|
|
5518
|
+
function gu(e) {
|
|
5454
5519
|
return 1 << e;
|
|
5455
5520
|
}
|
|
5456
5521
|
//#endregion
|
|
5457
5522
|
//#region src/json-schema-subset/expression/combination.ts
|
|
5458
|
-
function
|
|
5459
|
-
let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r :
|
|
5523
|
+
function _u(e) {
|
|
5524
|
+
let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r : vu(t, r, e), n += 1, t) };
|
|
5460
5525
|
return Object.defineProperties(r, {
|
|
5461
5526
|
result: { get: () => t },
|
|
5462
5527
|
count: { get: () => n }
|
|
5463
5528
|
}), r;
|
|
5464
5529
|
}
|
|
5465
|
-
function
|
|
5530
|
+
function vu(e, t, n) {
|
|
5466
5531
|
let r = 0;
|
|
5467
|
-
for (let [i, a] of
|
|
5468
|
-
for (let [e, a] of
|
|
5532
|
+
for (let [i, a] of lu) if (a & e) {
|
|
5533
|
+
for (let [e, a] of lu) if (a & t && (r |= n(i, e), r === uu)) return r;
|
|
5469
5534
|
}
|
|
5470
5535
|
return r;
|
|
5471
5536
|
}
|
|
@@ -5479,59 +5544,59 @@ var G = Object.freeze({
|
|
|
5479
5544
|
Not: 4,
|
|
5480
5545
|
Swap: 5
|
|
5481
5546
|
});
|
|
5482
|
-
function
|
|
5547
|
+
function yu(e, t) {
|
|
5483
5548
|
switch (e) {
|
|
5484
5549
|
case G.Save: return t[0];
|
|
5485
|
-
case G.OneOf: return
|
|
5550
|
+
case G.OneOf: return xu(t);
|
|
5486
5551
|
case G.AllOf:
|
|
5487
|
-
case G.AnyOf: return
|
|
5552
|
+
case G.AnyOf: return Su(e, t);
|
|
5488
5553
|
case G.Not:
|
|
5489
|
-
case G.Swap: return
|
|
5554
|
+
case G.Swap: return Cu(e, t[0]);
|
|
5490
5555
|
}
|
|
5491
5556
|
}
|
|
5492
|
-
function
|
|
5493
|
-
return
|
|
5557
|
+
function bu(e) {
|
|
5558
|
+
return Cu(G.Swap, e);
|
|
5494
5559
|
}
|
|
5495
|
-
function
|
|
5560
|
+
function xu(e) {
|
|
5496
5561
|
if (e.length === 1) return e[0];
|
|
5497
|
-
let t =
|
|
5562
|
+
let t = Su(G.AnyOf, e), n = [];
|
|
5498
5563
|
for (let t = 0; t < e.length; ++t) for (let r = t + 1; r < e.length; ++r) {
|
|
5499
|
-
let i = e[t], a = e[r], o =
|
|
5564
|
+
let i = e[t], a = e[r], o = Su(G.AllOf, [i, a]);
|
|
5500
5565
|
n.push(o);
|
|
5501
5566
|
}
|
|
5502
|
-
let r =
|
|
5503
|
-
return
|
|
5567
|
+
let r = Su(G.AnyOf, n), i = Cu(G.Not, r);
|
|
5568
|
+
return Su(G.AllOf, [t, i]);
|
|
5504
5569
|
}
|
|
5505
|
-
function
|
|
5570
|
+
function Su(e, t) {
|
|
5506
5571
|
if (t.length < 0) throw Error("invalid expressions: empty array");
|
|
5507
5572
|
let n;
|
|
5508
5573
|
switch (e) {
|
|
5509
5574
|
case G.AllOf:
|
|
5510
|
-
n =
|
|
5575
|
+
n = _u(wu);
|
|
5511
5576
|
break;
|
|
5512
5577
|
case G.AnyOf:
|
|
5513
|
-
n =
|
|
5578
|
+
n = _u(Tu);
|
|
5514
5579
|
break;
|
|
5515
5580
|
default: throw Error(`invalid operator ${e}`);
|
|
5516
5581
|
}
|
|
5517
5582
|
for (let e of t) n.push(e);
|
|
5518
5583
|
return n.result;
|
|
5519
5584
|
}
|
|
5520
|
-
function
|
|
5585
|
+
function Cu(e, t) {
|
|
5521
5586
|
let n, r = 0;
|
|
5522
5587
|
switch (e) {
|
|
5523
5588
|
case G.Not:
|
|
5524
|
-
n =
|
|
5589
|
+
n = Eu;
|
|
5525
5590
|
break;
|
|
5526
5591
|
case G.Swap:
|
|
5527
|
-
n =
|
|
5592
|
+
n = Du;
|
|
5528
5593
|
break;
|
|
5529
5594
|
default: throw Error(`invalid operator ${e}`);
|
|
5530
5595
|
}
|
|
5531
|
-
for (let [e, i] of
|
|
5596
|
+
for (let [e, i] of lu) i & t && (r |= n(e));
|
|
5532
5597
|
return r;
|
|
5533
5598
|
}
|
|
5534
|
-
function
|
|
5599
|
+
function wu(e, t) {
|
|
5535
5600
|
let n = 0;
|
|
5536
5601
|
switch (e) {
|
|
5537
5602
|
case z.Equals:
|
|
@@ -5620,7 +5685,7 @@ function Su(e, t) {
|
|
|
5620
5685
|
}
|
|
5621
5686
|
return n;
|
|
5622
5687
|
}
|
|
5623
|
-
function
|
|
5688
|
+
function Tu(e, t) {
|
|
5624
5689
|
let n = 0;
|
|
5625
5690
|
switch (e) {
|
|
5626
5691
|
case z.Equals:
|
|
@@ -5709,7 +5774,7 @@ function Cu(e, t) {
|
|
|
5709
5774
|
}
|
|
5710
5775
|
return n;
|
|
5711
5776
|
}
|
|
5712
|
-
function
|
|
5777
|
+
function Eu(e) {
|
|
5713
5778
|
let t = 0;
|
|
5714
5779
|
switch (e) {
|
|
5715
5780
|
case z.Equals:
|
|
@@ -5728,7 +5793,7 @@ function wu(e) {
|
|
|
5728
5793
|
}
|
|
5729
5794
|
return t;
|
|
5730
5795
|
}
|
|
5731
|
-
function
|
|
5796
|
+
function Du(e) {
|
|
5732
5797
|
let t = 0;
|
|
5733
5798
|
switch (e) {
|
|
5734
5799
|
case z.Equals:
|
|
@@ -5749,13 +5814,13 @@ function Tu(e) {
|
|
|
5749
5814
|
}
|
|
5750
5815
|
//#endregion
|
|
5751
5816
|
//#region src/json-schema-subset/expression/types.ts
|
|
5752
|
-
var
|
|
5817
|
+
var Ou = Object.freeze({
|
|
5753
5818
|
Leaf: 0,
|
|
5754
5819
|
Not: 1,
|
|
5755
5820
|
AllOf: 2,
|
|
5756
5821
|
AnyOf: 3,
|
|
5757
5822
|
OneOf: 4
|
|
5758
|
-
}),
|
|
5823
|
+
}), ku = (e) => (t, n) => {
|
|
5759
5824
|
let r = {
|
|
5760
5825
|
parent: null,
|
|
5761
5826
|
swapped: !1,
|
|
@@ -5783,7 +5848,7 @@ var Eu = Object.freeze({
|
|
|
5783
5848
|
let n = B, [r, o] = t.expressions;
|
|
5784
5849
|
if (!e.equals(r, o)) {
|
|
5785
5850
|
let a = e.describe(r);
|
|
5786
|
-
if (a.kind !==
|
|
5851
|
+
if (a.kind !== Ou.Leaf) {
|
|
5787
5852
|
let [e, n] = s(a, !1);
|
|
5788
5853
|
t.expressions = null, t.calculation = e;
|
|
5789
5854
|
for (let [e, r] of n.entries()) i.push({
|
|
@@ -5798,7 +5863,7 @@ var Eu = Object.freeze({
|
|
|
5798
5863
|
return;
|
|
5799
5864
|
}
|
|
5800
5865
|
let c = e.describe(o);
|
|
5801
|
-
if (c.kind !==
|
|
5866
|
+
if (c.kind !== Ou.Leaf) {
|
|
5802
5867
|
let [e, n] = s(c, !0);
|
|
5803
5868
|
t.expressions = null, t.calculation = e;
|
|
5804
5869
|
for (let [e, a] of n.entries()) i.push({
|
|
@@ -5824,16 +5889,16 @@ var Eu = Object.freeze({
|
|
|
5824
5889
|
function s(e, t) {
|
|
5825
5890
|
let n = G.Save, r;
|
|
5826
5891
|
switch (e.kind) {
|
|
5827
|
-
case
|
|
5892
|
+
case Ou.Not:
|
|
5828
5893
|
n = G.Not, r = [e.expression];
|
|
5829
5894
|
break;
|
|
5830
|
-
case
|
|
5895
|
+
case Ou.AllOf:
|
|
5831
5896
|
n = G.AllOf, r = [...e.expressions];
|
|
5832
5897
|
break;
|
|
5833
|
-
case
|
|
5898
|
+
case Ou.AnyOf:
|
|
5834
5899
|
n = G.AnyOf, r = [...e.expressions];
|
|
5835
5900
|
break;
|
|
5836
|
-
case
|
|
5901
|
+
case Ou.OneOf:
|
|
5837
5902
|
n = G.OneOf, r = [...e.expressions];
|
|
5838
5903
|
break;
|
|
5839
5904
|
default: throw Error(`invalid kind ${e.kind}`);
|
|
@@ -5846,8 +5911,8 @@ var Eu = Object.freeze({
|
|
|
5846
5911
|
}, r];
|
|
5847
5912
|
}
|
|
5848
5913
|
function c(e) {
|
|
5849
|
-
let t = e.calculation, n = e.parent, r =
|
|
5850
|
-
if (r === 0 && (r = H), t.willSwap && (r =
|
|
5914
|
+
let t = e.calculation, n = e.parent, r = yu(t.operator, t.results);
|
|
5915
|
+
if (r === 0 && (r = H), t.willSwap && (r = bu(r)), n) {
|
|
5851
5916
|
let e = n.node.calculation, t = e.results;
|
|
5852
5917
|
t[n.index] = r, e.count += 1, e.count >= t.length && a.push(n.node);
|
|
5853
5918
|
}
|
|
@@ -5855,79 +5920,79 @@ var Eu = Object.freeze({
|
|
|
5855
5920
|
let l = r.calculation.results[0];
|
|
5856
5921
|
if (l === 0) throw Error("cannot find result of root");
|
|
5857
5922
|
return l;
|
|
5858
|
-
},
|
|
5923
|
+
}, Au = class extends Error {
|
|
5859
5924
|
constructor(e = []) {
|
|
5860
|
-
super(
|
|
5925
|
+
super(Nu(e)), this.name = "SchemaError", this.items = e;
|
|
5861
5926
|
}
|
|
5862
|
-
},
|
|
5927
|
+
}, ju = Object.freeze({
|
|
5863
5928
|
Compiled: 0,
|
|
5864
5929
|
External: 1
|
|
5865
5930
|
});
|
|
5866
|
-
function
|
|
5931
|
+
function Mu(e) {
|
|
5867
5932
|
switch (e.kind) {
|
|
5868
|
-
case
|
|
5933
|
+
case ju.Compiled: {
|
|
5869
5934
|
let { message: t, path: n } = e;
|
|
5870
5935
|
return `${t} (at ${n.length > 0 ? n.join(".") : "$root"})`;
|
|
5871
5936
|
}
|
|
5872
|
-
case
|
|
5937
|
+
case ju.External: return String(e.error);
|
|
5873
5938
|
}
|
|
5874
5939
|
}
|
|
5875
|
-
function
|
|
5940
|
+
function Nu(e) {
|
|
5876
5941
|
switch (e.length) {
|
|
5877
5942
|
case 0: return "without any items";
|
|
5878
|
-
case 1: return
|
|
5879
|
-
default: return `${
|
|
5943
|
+
case 1: return Mu(e[0]);
|
|
5944
|
+
default: return `${Mu(e[0])} ... omit the rest ${e.length - 1} items`;
|
|
5880
5945
|
}
|
|
5881
5946
|
}
|
|
5882
5947
|
//#endregion
|
|
5883
5948
|
//#region src/json-schema-subset/compiler/common.ts
|
|
5884
|
-
var
|
|
5885
|
-
function
|
|
5886
|
-
return
|
|
5949
|
+
var Pu = /* @__PURE__ */ new Set(/* @__PURE__ */ "type.enum.const.multipleOf.maximum.exclusiveMaximum.minimum.exclusiveMinimum.maxLength.minLength.pattern.items.additionalItems.maxItems.minItems.uniqueItems.contains.maxProperties.minProperties.required.properties.patternProperties.additionalProperties.dependencies.propertyNames.if.then.else.allOf.anyOf.oneOf.not.format.contentMediaType.contentEncoding.definitions".split("."));
|
|
5950
|
+
function Fu(e) {
|
|
5951
|
+
return Pu.has(e);
|
|
5887
5952
|
}
|
|
5888
|
-
function
|
|
5889
|
-
for (let t in e) if (
|
|
5953
|
+
function Iu(e) {
|
|
5954
|
+
for (let t in e) if (Fu(t)) return !1;
|
|
5890
5955
|
return !0;
|
|
5891
5956
|
}
|
|
5892
|
-
function
|
|
5957
|
+
function Lu(e, ...t) {
|
|
5893
5958
|
return {
|
|
5894
5959
|
...e,
|
|
5895
5960
|
path: [...e.path, ...t]
|
|
5896
5961
|
};
|
|
5897
5962
|
}
|
|
5898
|
-
function
|
|
5963
|
+
function Ru(e) {
|
|
5899
5964
|
if (typeof e == "boolean") throw Error("JSONSchema7Definition cannot be boolean");
|
|
5900
5965
|
return e;
|
|
5901
5966
|
}
|
|
5902
|
-
function
|
|
5903
|
-
t.push(
|
|
5967
|
+
function zu({ path: e, errors: t }, n, ...r) {
|
|
5968
|
+
t.push(Bu(e, r, n));
|
|
5904
5969
|
}
|
|
5905
5970
|
function K({ path: e, warns: t }, n, ...r) {
|
|
5906
|
-
t.push(
|
|
5971
|
+
t.push(Bu(e, r, n));
|
|
5907
5972
|
}
|
|
5908
|
-
function
|
|
5973
|
+
function Bu(e, t, n) {
|
|
5909
5974
|
return {
|
|
5910
|
-
kind:
|
|
5975
|
+
kind: ju.Compiled,
|
|
5911
5976
|
message: n,
|
|
5912
5977
|
path: [...e, ...t]
|
|
5913
5978
|
};
|
|
5914
5979
|
}
|
|
5915
5980
|
//#endregion
|
|
5916
5981
|
//#region src/json-schema-subset/compiler/utils.ts
|
|
5917
|
-
function
|
|
5982
|
+
function Vu(e) {
|
|
5918
5983
|
for (let t in e) {
|
|
5919
5984
|
let n = e[t];
|
|
5920
|
-
n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] :
|
|
5985
|
+
n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] : Hu(n) && delete e[t]);
|
|
5921
5986
|
}
|
|
5922
5987
|
return e;
|
|
5923
5988
|
}
|
|
5924
|
-
function
|
|
5989
|
+
function Hu(e) {
|
|
5925
5990
|
for (let t in e) return !1;
|
|
5926
5991
|
return !0;
|
|
5927
5992
|
}
|
|
5928
5993
|
//#endregion
|
|
5929
5994
|
//#region src/json-schema-subset/compiler/wrapper.ts
|
|
5930
|
-
var
|
|
5995
|
+
var Uu = Symbol("compiledId"), Wu = Symbol("compiledKind"), Gu = Symbol("compiledPath"), Ku = Symbol("validatorLoader"), q = Object.freeze({
|
|
5931
5996
|
Extends: 0,
|
|
5932
5997
|
Never: 1,
|
|
5933
5998
|
Any: 2,
|
|
@@ -5940,62 +6005,62 @@ var Vu = Symbol("compiledId"), Hu = Symbol("compiledKind"), Uu = Symbol("compile
|
|
|
5940
6005
|
Not: 9,
|
|
5941
6006
|
Combination: 10,
|
|
5942
6007
|
EnumOrConst: 11
|
|
5943
|
-
}),
|
|
6008
|
+
}), qu = au(td(q.Any, iu(), {}, () => () => !0)), Ju = au(td(q.Never, iu(), {
|
|
5944
6009
|
type: "string",
|
|
5945
6010
|
maxLength: 0,
|
|
5946
6011
|
minLength: 1
|
|
5947
6012
|
}, () => () => !1));
|
|
5948
|
-
function
|
|
5949
|
-
return typeof e != "object" || !e ? !1 :
|
|
6013
|
+
function Yu(e) {
|
|
6014
|
+
return typeof e != "object" || !e ? !1 : Uu in e;
|
|
5950
6015
|
}
|
|
5951
|
-
function
|
|
5952
|
-
return typeof e != "object" || !e ? !1 :
|
|
6016
|
+
function Xu(e) {
|
|
6017
|
+
return typeof e != "object" || !e ? !1 : Uu in e && Wu in e;
|
|
5953
6018
|
}
|
|
5954
6019
|
function J(e) {
|
|
5955
|
-
return
|
|
6020
|
+
return Xu(e) ? e[Wu] : q.Extends;
|
|
5956
6021
|
}
|
|
5957
|
-
function
|
|
5958
|
-
return
|
|
6022
|
+
function Zu(e) {
|
|
6023
|
+
return Xu(e) || Yu(e) ? e[Uu] : e.id;
|
|
5959
6024
|
}
|
|
5960
|
-
function
|
|
5961
|
-
return
|
|
6025
|
+
function Qu(e) {
|
|
6026
|
+
return Xu(e) ? e[Gu] : void 0;
|
|
5962
6027
|
}
|
|
5963
|
-
function
|
|
5964
|
-
return typeof e != "object" || !e || Object.defineProperty(e,
|
|
5965
|
-
value:
|
|
6028
|
+
function $u(e) {
|
|
6029
|
+
return typeof e != "object" || !e || Object.defineProperty(e, Uu, {
|
|
6030
|
+
value: iu(),
|
|
5966
6031
|
configurable: !1,
|
|
5967
6032
|
writable: !1,
|
|
5968
6033
|
enumerable: !1
|
|
5969
6034
|
}), e;
|
|
5970
6035
|
}
|
|
5971
6036
|
function Y(e, t, n, r = []) {
|
|
5972
|
-
return
|
|
6037
|
+
return td(e, iu(), t, n && (() => n.compile(t)), r);
|
|
5973
6038
|
}
|
|
5974
|
-
function
|
|
5975
|
-
return
|
|
6039
|
+
function ed(e) {
|
|
6040
|
+
return td(q.Never, iu(), { ...e }, e[Ku], e[Gu]);
|
|
5976
6041
|
}
|
|
5977
|
-
function
|
|
6042
|
+
function td(e, t, n, r, i = []) {
|
|
5978
6043
|
let a = null;
|
|
5979
6044
|
return Object.defineProperties(n, {
|
|
5980
|
-
[
|
|
6045
|
+
[Wu]: {
|
|
5981
6046
|
value: e,
|
|
5982
6047
|
configurable: !1,
|
|
5983
6048
|
writable: !1,
|
|
5984
6049
|
enumerable: !1
|
|
5985
6050
|
},
|
|
5986
|
-
[
|
|
6051
|
+
[Uu]: {
|
|
5987
6052
|
value: t,
|
|
5988
6053
|
configurable: !1,
|
|
5989
6054
|
writable: !1,
|
|
5990
6055
|
enumerable: !1
|
|
5991
6056
|
},
|
|
5992
|
-
[
|
|
6057
|
+
[Gu]: {
|
|
5993
6058
|
value: i,
|
|
5994
6059
|
configurable: !1,
|
|
5995
6060
|
writable: !1,
|
|
5996
6061
|
enumerable: !1
|
|
5997
6062
|
},
|
|
5998
|
-
[
|
|
6063
|
+
[Ku]: {
|
|
5999
6064
|
value: r,
|
|
6000
6065
|
configurable: !1,
|
|
6001
6066
|
writable: !1,
|
|
@@ -6012,16 +6077,16 @@ function $u(e, t, n, r, i = []) {
|
|
|
6012
6077
|
}
|
|
6013
6078
|
//#endregion
|
|
6014
6079
|
//#region src/json-schema-subset/compiler/array.ts
|
|
6015
|
-
function
|
|
6016
|
-
let n =
|
|
6017
|
-
if (Array.isArray(n) ? s =
|
|
6080
|
+
function nd(e, t) {
|
|
6081
|
+
let n = rd(e, t), r = id(e, "maxItems", t), i = id(e, "minItems", t), a = ad(e, t), o = t.uniqueItems, s;
|
|
6082
|
+
if (Array.isArray(n) ? s = od(e, t) : t.additionalItems && K(e, "it is needless when items is not array", "additionalItems"), !n || !a || s === null) return null;
|
|
6018
6083
|
let c = !1, l = !1;
|
|
6019
6084
|
if (Array.isArray(n)) {
|
|
6020
|
-
r !== void 0 && r <= n.length && (n = n.splice(r), s =
|
|
6085
|
+
r !== void 0 && r <= n.length && (n = n.splice(r), s = sd(s, e.delegate));
|
|
6021
6086
|
let t = n.findIndex((e) => J(e) === q.Never);
|
|
6022
|
-
t !== -1 && (n = n.splice(t), s =
|
|
6087
|
+
t !== -1 && (n = n.splice(t), s = sd(s, e.delegate), r === void 0 && (r = n.length, l = !0)), i !== void 0 && n.length < i && (K(e, `length(${n.length}) of items if less than minItems(${i})`), c = !0), n.length === 0 && s && J(s) === q.Never && (c = !0);
|
|
6023
6088
|
} else J(n) === q.Never && (c = !0);
|
|
6024
|
-
return r !== void 0 && i !== void 0 && r < i && (l || K(e, `maxItems(${r}) is less than minItems(${i})`), c = !0), Y(c ? q.Never : q.Array,
|
|
6089
|
+
return r !== void 0 && i !== void 0 && r < i && (l || K(e, `maxItems(${r}) is less than minItems(${i})`), c = !0), Y(c ? q.Never : q.Array, Vu({
|
|
6025
6090
|
type: "array",
|
|
6026
6091
|
items: n,
|
|
6027
6092
|
contains: a,
|
|
@@ -6031,12 +6096,12 @@ function ed(e, t) {
|
|
|
6031
6096
|
additionalItems: s
|
|
6032
6097
|
}), e.delegate, e.path);
|
|
6033
6098
|
}
|
|
6034
|
-
function
|
|
6099
|
+
function rd(e, { items: t }) {
|
|
6035
6100
|
if (!t) return Y(q.Any, {}, e.delegate, e.path);
|
|
6036
6101
|
if (Array.isArray(t)) {
|
|
6037
6102
|
let n = [], r = !1;
|
|
6038
6103
|
for (let [i, a] of t.entries()) {
|
|
6039
|
-
let t =
|
|
6104
|
+
let t = Vd(Lu(e, "items", i), Ru(a));
|
|
6040
6105
|
if (!t) {
|
|
6041
6106
|
r = !0;
|
|
6042
6107
|
continue;
|
|
@@ -6045,9 +6110,9 @@ function td(e, { items: t }) {
|
|
|
6045
6110
|
}
|
|
6046
6111
|
return r ? null : n;
|
|
6047
6112
|
}
|
|
6048
|
-
return
|
|
6113
|
+
return Vd(Lu(e, "items"), Ru(t));
|
|
6049
6114
|
}
|
|
6050
|
-
function
|
|
6115
|
+
function id(e, t, n) {
|
|
6051
6116
|
let r = n[t];
|
|
6052
6117
|
if (r !== void 0) {
|
|
6053
6118
|
if (Number.isNaN(r)) {
|
|
@@ -6061,35 +6126,35 @@ function nd(e, t, n) {
|
|
|
6061
6126
|
return r;
|
|
6062
6127
|
}
|
|
6063
6128
|
}
|
|
6064
|
-
function
|
|
6065
|
-
return t ?
|
|
6129
|
+
function ad(e, { contains: t }) {
|
|
6130
|
+
return t ? Vd(Lu(e, "contains"), Ru(t)) : Y(q.Any, {}, e.delegate, e.path);
|
|
6066
6131
|
}
|
|
6067
|
-
function
|
|
6132
|
+
function od(e, { additionalItems: t }) {
|
|
6068
6133
|
switch (typeof t) {
|
|
6069
6134
|
case "boolean": return t ? Y(q.Any, {}, e.delegate, e.path) : !1;
|
|
6070
|
-
case "object": return
|
|
6135
|
+
case "object": return Vd(Lu(e, "additionalItems"), t);
|
|
6071
6136
|
default: return Y(q.Any, {}, e.delegate, e.path);
|
|
6072
6137
|
}
|
|
6073
6138
|
}
|
|
6074
|
-
function
|
|
6139
|
+
function sd(e, t) {
|
|
6075
6140
|
return e === void 0 ? Y(q.Never, {
|
|
6076
6141
|
type: "string",
|
|
6077
6142
|
maxLength: 0,
|
|
6078
6143
|
minLength: 1
|
|
6079
|
-
}, t) :
|
|
6144
|
+
}, t) : Xu(e) ? J(e) === q.Never ? e : ed(e) : e;
|
|
6080
6145
|
}
|
|
6081
6146
|
//#endregion
|
|
6082
6147
|
//#region src/json-schema-subset/compiler/combination.ts
|
|
6083
|
-
var
|
|
6148
|
+
var cd = Object.freeze([
|
|
6084
6149
|
"allOf",
|
|
6085
6150
|
"anyOf",
|
|
6086
6151
|
"oneOf"
|
|
6087
6152
|
]);
|
|
6088
|
-
function
|
|
6089
|
-
if (n.length === 0) return
|
|
6153
|
+
function ld(e, t, n, r) {
|
|
6154
|
+
if (n.length === 0) return zu(e, "disable empty list", t), null;
|
|
6090
6155
|
let i = [];
|
|
6091
6156
|
for (let [r, a] of n.entries()) {
|
|
6092
|
-
let n =
|
|
6157
|
+
let n = Vd(Lu(e, t, r), Ru(a));
|
|
6093
6158
|
n && i.push(n);
|
|
6094
6159
|
}
|
|
6095
6160
|
if (i.length < n.length) return null;
|
|
@@ -6103,7 +6168,7 @@ function sd(e, t, n, r) {
|
|
|
6103
6168
|
let s = q.Combination;
|
|
6104
6169
|
switch (t) {
|
|
6105
6170
|
case "allOf":
|
|
6106
|
-
o > 0 ? s = q.Never : a === i.length ? s = q.Any :
|
|
6171
|
+
o > 0 ? s = q.Never : a === i.length ? s = q.Any : ud(i) || (s = q.Never);
|
|
6107
6172
|
break;
|
|
6108
6173
|
case "anyOf":
|
|
6109
6174
|
a > 0 ? s = q.Any : o === i.length && (s = q.Never);
|
|
@@ -6112,7 +6177,7 @@ function sd(e, t, n, r) {
|
|
|
6112
6177
|
}
|
|
6113
6178
|
return Y(s, { [t]: i }, r, e.path);
|
|
6114
6179
|
}
|
|
6115
|
-
function
|
|
6180
|
+
function ud(e) {
|
|
6116
6181
|
let t = null;
|
|
6117
6182
|
for (let n of e) {
|
|
6118
6183
|
let e = J(n);
|
|
@@ -6127,35 +6192,35 @@ function cd(e) {
|
|
|
6127
6192
|
}
|
|
6128
6193
|
//#endregion
|
|
6129
6194
|
//#region src/json-schema-subset/checker/validator.ts
|
|
6130
|
-
var
|
|
6195
|
+
var dd = Object.freeze({
|
|
6131
6196
|
Valid: 0,
|
|
6132
6197
|
Invalid: 1,
|
|
6133
6198
|
Unknown: 2
|
|
6134
6199
|
});
|
|
6135
|
-
function
|
|
6200
|
+
function fd(e, t) {
|
|
6136
6201
|
let n = e.isValid;
|
|
6137
|
-
return n ? n(t) === !0 ?
|
|
6202
|
+
return n ? n(t) === !0 ? dd.Valid : dd.Invalid : dd.Unknown;
|
|
6138
6203
|
}
|
|
6139
6204
|
//#endregion
|
|
6140
6205
|
//#region src/json-schema-subset/compiler/enumAndConst.ts
|
|
6141
|
-
function
|
|
6206
|
+
function pd(e, t, n, r) {
|
|
6142
6207
|
let i, a = !1;
|
|
6143
6208
|
if (t) {
|
|
6144
|
-
if (t.length === 0) return
|
|
6209
|
+
if (t.length === 0) return zu(e, "disable empty list", "enum"), null;
|
|
6145
6210
|
i = [];
|
|
6146
|
-
for (let [n, a] of t.entries()) switch (
|
|
6147
|
-
case
|
|
6148
|
-
i.push(
|
|
6211
|
+
for (let [n, a] of t.entries()) switch (fd(r, a)) {
|
|
6212
|
+
case dd.Valid:
|
|
6213
|
+
i.push($u(a));
|
|
6149
6214
|
break;
|
|
6150
|
-
case
|
|
6215
|
+
case dd.Invalid: K(e, "cannot pass JSON schema of currently schema object", "enum", n);
|
|
6151
6216
|
}
|
|
6152
6217
|
i.length === 0 && K(e, "all of elements from list is rejected by currently schema object", "enum");
|
|
6153
6218
|
}
|
|
6154
|
-
if (n &&
|
|
6219
|
+
if (n && fd(r, n) === dd.Invalid && (a = !0), i) {
|
|
6155
6220
|
if (i.length === 0) a = !0;
|
|
6156
6221
|
else if (n) {
|
|
6157
6222
|
let e = !1;
|
|
6158
|
-
for (let t of i) if (
|
|
6223
|
+
for (let t of i) if (cu(t, n)) {
|
|
6159
6224
|
e = !0;
|
|
6160
6225
|
break;
|
|
6161
6226
|
}
|
|
@@ -6163,11 +6228,11 @@ function dd(e, t, n, r) {
|
|
|
6163
6228
|
}
|
|
6164
6229
|
}
|
|
6165
6230
|
let o = a ? q.Never : q.EnumOrConst, s = {};
|
|
6166
|
-
return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const =
|
|
6231
|
+
return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const = $u(su(n))), Y(o, s, e.delegate, e.path);
|
|
6167
6232
|
}
|
|
6168
6233
|
//#endregion
|
|
6169
6234
|
//#region src/json-schema-subset/compiler/object.ts
|
|
6170
|
-
var
|
|
6235
|
+
var md = /* @__PURE__ */ new Set([
|
|
6171
6236
|
"type",
|
|
6172
6237
|
"maxProperties",
|
|
6173
6238
|
"minProperties",
|
|
@@ -6178,27 +6243,27 @@ var fd = /* @__PURE__ */ new Set([
|
|
|
6178
6243
|
"dependencies",
|
|
6179
6244
|
"propertyNames"
|
|
6180
6245
|
]);
|
|
6181
|
-
function
|
|
6182
|
-
let n = Object.keys(t).filter((e) => !
|
|
6246
|
+
function hd(e, t) {
|
|
6247
|
+
let n = Object.keys(t).filter((e) => !md.has(e) && Fu(e));
|
|
6183
6248
|
n.length > 0 && K(e, `type="object" will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
6184
|
-
let r =
|
|
6249
|
+
let r = gd(e, "maxProperties", t), i = gd(e, "minProperties", t), a = _d(e, t), o = vd(e, t), s = yd(e, t), c = xd(e, t);
|
|
6185
6250
|
if (!a || !o || !s || !c) return null;
|
|
6186
|
-
let l =
|
|
6251
|
+
let l = bd(e, o, s, t);
|
|
6187
6252
|
if (!l) return null;
|
|
6188
|
-
let u =
|
|
6189
|
-
return Y(
|
|
6253
|
+
let u = Cd(e, Sd(a, o, s, l), c, t);
|
|
6254
|
+
return Y(wd(e, a, l, u, r, i) ? q.Never : q.Object, Vu({
|
|
6190
6255
|
type: "object",
|
|
6191
6256
|
required: u,
|
|
6192
6257
|
properties: l,
|
|
6193
6258
|
minProperties: i,
|
|
6194
6259
|
maxProperties: r,
|
|
6195
6260
|
additionalProperties: a,
|
|
6196
|
-
patternProperties:
|
|
6197
|
-
dependencies:
|
|
6261
|
+
patternProperties: kd(o),
|
|
6262
|
+
dependencies: Ad(c, t),
|
|
6198
6263
|
propertyNames: s
|
|
6199
6264
|
}), e.delegate, e.path);
|
|
6200
6265
|
}
|
|
6201
|
-
function
|
|
6266
|
+
function gd(e, t, n) {
|
|
6202
6267
|
let r = n[t];
|
|
6203
6268
|
if (r !== void 0) {
|
|
6204
6269
|
if (Number.isNaN(r)) {
|
|
@@ -6212,22 +6277,22 @@ function md(e, t, n) {
|
|
|
6212
6277
|
return r;
|
|
6213
6278
|
}
|
|
6214
6279
|
}
|
|
6215
|
-
function
|
|
6280
|
+
function _d(e, { additionalProperties: t }) {
|
|
6216
6281
|
return t === !1 ? Y(q.Never, {
|
|
6217
6282
|
type: "string",
|
|
6218
6283
|
maxLength: 0,
|
|
6219
6284
|
minLength: 1
|
|
6220
|
-
}, e.delegate, e.path) : typeof t == "object" ?
|
|
6285
|
+
}, e.delegate, e.path) : typeof t == "object" ? Vd(Lu(e, "additionalProperties"), Ru(t)) : Y(q.Any, {}, e.delegate, e.path);
|
|
6221
6286
|
}
|
|
6222
|
-
function
|
|
6287
|
+
function vd(e, { patternProperties: t }) {
|
|
6223
6288
|
let n = !1, r = {};
|
|
6224
6289
|
for (let i in t) {
|
|
6225
|
-
let a =
|
|
6290
|
+
let a = Od(i);
|
|
6226
6291
|
if (a instanceof Error) {
|
|
6227
6292
|
K(e, `property name invalid. ${i}`, "patternProperties", i);
|
|
6228
6293
|
continue;
|
|
6229
6294
|
}
|
|
6230
|
-
let o =
|
|
6295
|
+
let o = Ru(t[i]), s = Vd(Lu(e, "patternProperties", i), o);
|
|
6231
6296
|
if (!s) {
|
|
6232
6297
|
n = !0;
|
|
6233
6298
|
continue;
|
|
@@ -6236,29 +6301,29 @@ function gd(e, { patternProperties: t }) {
|
|
|
6236
6301
|
}
|
|
6237
6302
|
return n ? null : r;
|
|
6238
6303
|
}
|
|
6239
|
-
function
|
|
6304
|
+
function yd(e, { propertyNames: t }) {
|
|
6240
6305
|
if (!t) return Y(q.Any, {}, e.delegate, e.path);
|
|
6241
|
-
t =
|
|
6242
|
-
let n =
|
|
6306
|
+
t = Ru(t);
|
|
6307
|
+
let n = Vd(Lu(e, "propertyNames"), t);
|
|
6243
6308
|
if (!n) return null;
|
|
6244
6309
|
let r = J(n);
|
|
6245
|
-
return r !== q.String && r !== q.Any ?
|
|
6310
|
+
return r !== q.String && r !== q.Any ? ed(n) : n;
|
|
6246
6311
|
}
|
|
6247
|
-
function
|
|
6312
|
+
function bd(e, t, n, { properties: r }) {
|
|
6248
6313
|
let i = !1;
|
|
6249
6314
|
if (!r) return {};
|
|
6250
6315
|
let a = {};
|
|
6251
6316
|
for (let o in r) {
|
|
6252
|
-
if (
|
|
6317
|
+
if (fd(n, o) === dd.Invalid) {
|
|
6253
6318
|
K(e, `key ${JSON.stringify(o)} cannot pass JSON schema from propertyNames`, "properties");
|
|
6254
6319
|
continue;
|
|
6255
6320
|
}
|
|
6256
|
-
let s =
|
|
6321
|
+
let s = Dd(t, o);
|
|
6257
6322
|
if (s && J(s) === q.Never) {
|
|
6258
6323
|
K(e, `key ${JSON.stringify(o)} matches a pattern that has a impossible(never) schema`, "properties");
|
|
6259
6324
|
continue;
|
|
6260
6325
|
}
|
|
6261
|
-
let c =
|
|
6326
|
+
let c = Ru(r[o]), l = Vd(Lu(e, "properties", o), c);
|
|
6262
6327
|
if (!l) {
|
|
6263
6328
|
i = !0;
|
|
6264
6329
|
continue;
|
|
@@ -6267,40 +6332,40 @@ function vd(e, t, n, { properties: r }) {
|
|
|
6267
6332
|
}
|
|
6268
6333
|
return i ? null : a;
|
|
6269
6334
|
}
|
|
6270
|
-
function
|
|
6335
|
+
function xd(e, { dependencies: t }) {
|
|
6271
6336
|
if (!t) return [{}, {}];
|
|
6272
6337
|
let n = {}, r = {};
|
|
6273
6338
|
for (let i in t) {
|
|
6274
|
-
let a =
|
|
6339
|
+
let a = Ru(t[i]);
|
|
6275
6340
|
if (Array.isArray(a)) {
|
|
6276
|
-
let { keys: t, duplicated: r } =
|
|
6341
|
+
let { keys: t, duplicated: r } = Ed(a);
|
|
6277
6342
|
r && K(e, `found duplicated property names: ${r.join(", ")}`, "dependencies", i), n[i] = t;
|
|
6278
6343
|
} else {
|
|
6279
|
-
let t =
|
|
6344
|
+
let t = Vd(Lu(e, "dependencies", i), a);
|
|
6280
6345
|
if (t) {
|
|
6281
6346
|
let e = J(t);
|
|
6282
|
-
r[i] = e === q.Object || e === q.Any ? t : e === q.Extends ?
|
|
6347
|
+
r[i] = e === q.Object || e === q.Any ? t : e === q.Extends ? Ju : ed(t);
|
|
6283
6348
|
}
|
|
6284
6349
|
}
|
|
6285
6350
|
}
|
|
6286
6351
|
return [n, r];
|
|
6287
6352
|
}
|
|
6288
|
-
function
|
|
6353
|
+
function Sd(e, t, n, r) {
|
|
6289
6354
|
return (i) => {
|
|
6290
|
-
if (
|
|
6291
|
-
let a =
|
|
6355
|
+
if (fd(n, i) === dd.Invalid) return !0;
|
|
6356
|
+
let a = Dd(t, i);
|
|
6292
6357
|
return !!(a && J(a) === q.Never || J(r[i] ?? e) === q.Never);
|
|
6293
6358
|
};
|
|
6294
6359
|
}
|
|
6295
|
-
function
|
|
6360
|
+
function Cd(e, t, n, { required: r }) {
|
|
6296
6361
|
if (!r) return [];
|
|
6297
|
-
let i =
|
|
6362
|
+
let i = Ed(r);
|
|
6298
6363
|
i.duplicated && K(e, `found duplicated required keys: ${i.duplicated.join(", ")}`, "required");
|
|
6299
6364
|
let a = [], o = [];
|
|
6300
|
-
for (let e of i.keys)
|
|
6365
|
+
for (let e of i.keys) Td(n, e).some((e) => t(e)) ? o.push(e) : a.push(e);
|
|
6301
6366
|
return o.length > 0 && K(e, `key ${o.map((e) => JSON.stringify(e)).join(", ")} will ban by another condition`, "required"), a;
|
|
6302
6367
|
}
|
|
6303
|
-
function
|
|
6368
|
+
function wd(e, t, n, r, i, a) {
|
|
6304
6369
|
if (i !== void 0 && a !== void 0 && i < a) return K(e, `maxProperties(${i}) is less than minProperties(${a})`), !0;
|
|
6305
6370
|
if (i !== void 0 && r.length > i) return K(e, `length(${r.length}) of required is greater than maxProperties(${i})`), !0;
|
|
6306
6371
|
if (a !== void 0 && r.length < a) return K(e, `length(${r.length}) of required is less than minProperties(${a})`), !0;
|
|
@@ -6311,7 +6376,7 @@ function Sd(e, t, n, r, i, a) {
|
|
|
6311
6376
|
}
|
|
6312
6377
|
return !0;
|
|
6313
6378
|
}
|
|
6314
|
-
function
|
|
6379
|
+
function Td([e, t], n) {
|
|
6315
6380
|
let r = [n], i = new Set(r);
|
|
6316
6381
|
for (; r.length > 0;) {
|
|
6317
6382
|
let n = r.pop(), i = t[n], o = e[n];
|
|
@@ -6322,7 +6387,7 @@ function Cd([e, t], n) {
|
|
|
6322
6387
|
}
|
|
6323
6388
|
return [...i];
|
|
6324
6389
|
}
|
|
6325
|
-
function
|
|
6390
|
+
function Ed(e) {
|
|
6326
6391
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
6327
6392
|
for (let r of e) t.has(r) ? n.add(r) : t.add(r);
|
|
6328
6393
|
return n.size === 0 ? {
|
|
@@ -6333,14 +6398,14 @@ function wd(e) {
|
|
|
6333
6398
|
duplicated: [...n]
|
|
6334
6399
|
};
|
|
6335
6400
|
}
|
|
6336
|
-
function
|
|
6401
|
+
function Dd(e, t) {
|
|
6337
6402
|
for (let n in e) {
|
|
6338
6403
|
let [r, i] = e[n];
|
|
6339
6404
|
if (i.test(t)) return r;
|
|
6340
6405
|
}
|
|
6341
6406
|
return null;
|
|
6342
6407
|
}
|
|
6343
|
-
function
|
|
6408
|
+
function Od(e) {
|
|
6344
6409
|
try {
|
|
6345
6410
|
return new RegExp(e, "i");
|
|
6346
6411
|
} catch (e) {
|
|
@@ -6348,12 +6413,12 @@ function Ed(e) {
|
|
|
6348
6413
|
throw e;
|
|
6349
6414
|
}
|
|
6350
6415
|
}
|
|
6351
|
-
function
|
|
6416
|
+
function kd(e) {
|
|
6352
6417
|
let t = {};
|
|
6353
6418
|
for (let n in e) t[n] = e[n][0];
|
|
6354
6419
|
return t;
|
|
6355
6420
|
}
|
|
6356
|
-
function
|
|
6421
|
+
function Ad([e, t], { dependencies: n }) {
|
|
6357
6422
|
let r = {};
|
|
6358
6423
|
for (let i in n) {
|
|
6359
6424
|
let n = e[i], a = t[i];
|
|
@@ -6363,39 +6428,39 @@ function Od([e, t], { dependencies: n }) {
|
|
|
6363
6428
|
}
|
|
6364
6429
|
//#endregion
|
|
6365
6430
|
//#region src/json-schema-subset/compiler/primitive.ts
|
|
6366
|
-
var
|
|
6431
|
+
var jd = /* @__PURE__ */ new Set([
|
|
6367
6432
|
"type",
|
|
6368
6433
|
"multipleOf",
|
|
6369
6434
|
"maximum",
|
|
6370
6435
|
"exclusiveMaximum",
|
|
6371
6436
|
"minimum",
|
|
6372
6437
|
"exclusiveMinimum"
|
|
6373
|
-
]),
|
|
6438
|
+
]), Md = /* @__PURE__ */ new Set([
|
|
6374
6439
|
"type",
|
|
6375
6440
|
"format",
|
|
6376
6441
|
"maxLength",
|
|
6377
6442
|
"minLength",
|
|
6378
6443
|
"pattern"
|
|
6379
6444
|
]);
|
|
6380
|
-
function
|
|
6445
|
+
function Nd(e, t) {
|
|
6381
6446
|
let { type: n } = t;
|
|
6382
6447
|
switch (n) {
|
|
6383
6448
|
case "number":
|
|
6384
|
-
case "integer": return
|
|
6385
|
-
case "string": return
|
|
6449
|
+
case "integer": return Pd(e, t);
|
|
6450
|
+
case "string": return Id(e, t);
|
|
6386
6451
|
case "boolean":
|
|
6387
6452
|
case "null": {
|
|
6388
|
-
let r = Object.keys(t).filter((e) =>
|
|
6453
|
+
let r = Object.keys(t).filter((e) => Fu(e) && e !== "type");
|
|
6389
6454
|
return r.length > 0 && K(e, `key "type" will exclude other keys: ${r.toSorted().join(", ")}`), Y(n === "null" ? q.Null : q.Boolean, { type: n }, e.delegate, e.path);
|
|
6390
6455
|
}
|
|
6391
|
-
default: return
|
|
6456
|
+
default: return zu(e, `invalid type ${JSON.stringify(n)}`), null;
|
|
6392
6457
|
}
|
|
6393
6458
|
}
|
|
6394
|
-
function
|
|
6395
|
-
let n = Object.keys(t).filter((e) => !
|
|
6459
|
+
function Pd(e, t) {
|
|
6460
|
+
let n = Object.keys(t).filter((e) => !jd.has(e) && Fu(e));
|
|
6396
6461
|
n.length > 0 && K(e, `type=${JSON.stringify(t.type)} will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
6397
|
-
let r =
|
|
6398
|
-
for (let t of
|
|
6462
|
+
let r = ou(t, jd);
|
|
6463
|
+
for (let t of jd) {
|
|
6399
6464
|
let n = r[t];
|
|
6400
6465
|
t !== "type" && n !== void 0 && Number.isNaN(n) && (K(e, "found NaN", t), delete r[t]);
|
|
6401
6466
|
}
|
|
@@ -6404,38 +6469,38 @@ function Md(e, t) {
|
|
|
6404
6469
|
let { multipleOf: c } = r;
|
|
6405
6470
|
c === 0 && (delete r.multipleOf, r.type = "number", K(e, "cannot be 0", "multipleOf"));
|
|
6406
6471
|
let l = q.Numeric;
|
|
6407
|
-
return
|
|
6472
|
+
return Fd(r) || (l = q.Never), Y(l, r, e.delegate, e.path);
|
|
6408
6473
|
}
|
|
6409
|
-
function
|
|
6474
|
+
function Fd(e) {
|
|
6410
6475
|
let { maximum: t, exclusiveMaximum: n, minimum: r, exclusiveMinimum: i } = e;
|
|
6411
6476
|
return t !== void 0 && r !== void 0 ? t >= r : n !== void 0 && r !== void 0 ? n > r : t !== void 0 && i !== void 0 ? t > i : n !== void 0 && i !== void 0 ? n > i : !0;
|
|
6412
6477
|
}
|
|
6413
|
-
function
|
|
6414
|
-
let n = Object.keys(t).filter((e) => !
|
|
6478
|
+
function Id(e, t) {
|
|
6479
|
+
let n = Object.keys(t).filter((e) => !Md.has(e) && Fu(e));
|
|
6415
6480
|
n.length > 0 && K(e, `type="string" will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
6416
|
-
let r =
|
|
6417
|
-
|
|
6481
|
+
let r = ou(t, Md);
|
|
6482
|
+
Ld(e, r, "maxLength"), Ld(e, r, "minLength");
|
|
6418
6483
|
let i = r.maxLength, a = r.minLength, o = q.String;
|
|
6419
6484
|
return i !== void 0 && (i < 0 || i !== void 0 && a !== void 0 && i < a) && (o = q.Never), Y(o, r, e.delegate, e.path);
|
|
6420
6485
|
}
|
|
6421
|
-
function
|
|
6486
|
+
function Ld(e, t, n) {
|
|
6422
6487
|
let r = t[n];
|
|
6423
6488
|
r !== void 0 && Number.isNaN(r) && (K(e, "found NaN", n), delete t[n]);
|
|
6424
6489
|
}
|
|
6425
6490
|
//#endregion
|
|
6426
6491
|
//#region src/json-schema-subset/compiler/compiler.ts
|
|
6427
|
-
var
|
|
6428
|
-
function
|
|
6429
|
-
if (
|
|
6492
|
+
var Rd = Object.freeze([]);
|
|
6493
|
+
function zd(e, t, n, r) {
|
|
6494
|
+
if (Xu(e) || t.isExtendsSchema(e)) return {
|
|
6430
6495
|
schema: e,
|
|
6431
|
-
warns:
|
|
6496
|
+
warns: Rd
|
|
6432
6497
|
};
|
|
6433
6498
|
if (r) {
|
|
6434
6499
|
let t = r.isSchema(e);
|
|
6435
6500
|
if (typeof t == "object") {
|
|
6436
6501
|
let e = [];
|
|
6437
6502
|
for (let n of t) e.push({
|
|
6438
|
-
kind:
|
|
6503
|
+
kind: ju.External,
|
|
6439
6504
|
error: n
|
|
6440
6505
|
});
|
|
6441
6506
|
if (e.length > 0) return e;
|
|
@@ -6448,19 +6513,19 @@ function Ld(e, t, n, r) {
|
|
|
6448
6513
|
path: [],
|
|
6449
6514
|
errors: [],
|
|
6450
6515
|
warns: []
|
|
6451
|
-
}, a =
|
|
6452
|
-
if (a)
|
|
6453
|
-
else return
|
|
6516
|
+
}, a = Vd(i, e);
|
|
6517
|
+
if (a) Bd(i.errors.length === 0, "found errors (it should be empty)");
|
|
6518
|
+
else return Bd(i.errors.length > 0, "cannot found any errors"), i.errors;
|
|
6454
6519
|
return {
|
|
6455
6520
|
schema: a,
|
|
6456
6521
|
warns: i.warns
|
|
6457
6522
|
};
|
|
6458
6523
|
}
|
|
6459
|
-
function
|
|
6524
|
+
function Bd(e, t) {
|
|
6460
6525
|
if (!e) throw Error(t);
|
|
6461
6526
|
}
|
|
6462
|
-
function
|
|
6463
|
-
if (e.extends.isExtendsSchema(t) ||
|
|
6527
|
+
function Vd(e, t) {
|
|
6528
|
+
if (e.extends.isExtendsSchema(t) || Xu(t)) return t;
|
|
6464
6529
|
let n = e.extends.tryCompiledExtendsSchema(t, e.payload);
|
|
6465
6530
|
if (n) return n;
|
|
6466
6531
|
let r = t, i = !1, { enum: a, const: o } = t;
|
|
@@ -6468,23 +6533,23 @@ function zd(e, t) {
|
|
|
6468
6533
|
let { enum: e, const: n, ...a } = t;
|
|
6469
6534
|
r = a, i = !0;
|
|
6470
6535
|
}
|
|
6471
|
-
let s =
|
|
6472
|
-
return s && i && (s =
|
|
6536
|
+
let s = Hd(e, r);
|
|
6537
|
+
return s && i && (s = pd(e, a, o, s)), s || null;
|
|
6473
6538
|
}
|
|
6474
|
-
function
|
|
6475
|
-
for (let n of
|
|
6539
|
+
function Hd(e, t) {
|
|
6540
|
+
for (let n of cd) {
|
|
6476
6541
|
let r = t[n];
|
|
6477
6542
|
if (r) {
|
|
6478
|
-
let i = Object.keys(t).filter((e) =>
|
|
6479
|
-
return i.length > 0 && K(e, `composition key ${JSON.stringify(n)} will exclude other keys: ${i.toSorted().join(", ")}`),
|
|
6543
|
+
let i = Object.keys(t).filter((e) => Fu(e) && e !== n);
|
|
6544
|
+
return i.length > 0 && K(e, `composition key ${JSON.stringify(n)} will exclude other keys: ${i.toSorted().join(", ")}`), ld(e, n, r) || null;
|
|
6480
6545
|
}
|
|
6481
6546
|
}
|
|
6482
6547
|
{
|
|
6483
|
-
let n =
|
|
6548
|
+
let n = Ru(t.not);
|
|
6484
6549
|
if (n) {
|
|
6485
|
-
let r = Object.keys(t).filter((e) =>
|
|
6550
|
+
let r = Object.keys(t).filter((e) => Fu(e) && e !== "not");
|
|
6486
6551
|
r.length > 0 && K(e, `key "not" will exclude other keys: ${r.toSorted().join(", ")}`);
|
|
6487
|
-
let i =
|
|
6552
|
+
let i = Vd(Lu(e, "not"), n);
|
|
6488
6553
|
if (!i) return null;
|
|
6489
6554
|
let a = q.Not;
|
|
6490
6555
|
switch (J(i)) {
|
|
@@ -6500,26 +6565,26 @@ function Bd(e, t) {
|
|
|
6500
6565
|
let { type: n } = t;
|
|
6501
6566
|
if (Array.isArray(n)) {
|
|
6502
6567
|
let { type: r, ...i } = t;
|
|
6503
|
-
return
|
|
6568
|
+
return ld(e, "anyOf", n.map((e) => ({
|
|
6504
6569
|
...i,
|
|
6505
6570
|
type: e
|
|
6506
6571
|
})));
|
|
6507
6572
|
}
|
|
6508
6573
|
switch (n) {
|
|
6509
|
-
case "object": return
|
|
6510
|
-
case "array": return
|
|
6511
|
-
default: return
|
|
6574
|
+
case "object": return hd(e, t);
|
|
6575
|
+
case "array": return nd(e, t);
|
|
6576
|
+
default: return Nd(e, t);
|
|
6512
6577
|
}
|
|
6513
6578
|
}
|
|
6514
|
-
return
|
|
6579
|
+
return Iu(t) ? Y(q.Any, {}, e.delegate, e.path) : (zu(e, "unrecognized"), null);
|
|
6515
6580
|
}
|
|
6516
6581
|
//#endregion
|
|
6517
6582
|
//#region src/json-schema-subset/checker/tools/mark.ts
|
|
6518
|
-
var
|
|
6583
|
+
var Ud = class {
|
|
6519
6584
|
constructor(e) {
|
|
6520
6585
|
let t = Object.freeze(e.toSorted());
|
|
6521
6586
|
if (t.length > 32) throw Error(`cannot define ${t.length} keys which is greater than 32`);
|
|
6522
|
-
this.keys = t, this.clazz = class extends
|
|
6587
|
+
this.keys = t, this.clazz = class extends Wd {
|
|
6523
6588
|
constructor(e) {
|
|
6524
6589
|
super(t, e);
|
|
6525
6590
|
}
|
|
@@ -6543,7 +6608,7 @@ var Vd = class {
|
|
|
6543
6608
|
else if (e) for (let [n, r] of this.keys.entries()) e[r] && (t |= 1 << n);
|
|
6544
6609
|
return new this.clazz(t);
|
|
6545
6610
|
}
|
|
6546
|
-
},
|
|
6611
|
+
}, Wd = class {
|
|
6547
6612
|
constructor(e, t) {
|
|
6548
6613
|
this.keys = e, this.int32 = t;
|
|
6549
6614
|
}
|
|
@@ -6558,21 +6623,21 @@ var Vd = class {
|
|
|
6558
6623
|
};
|
|
6559
6624
|
//#endregion
|
|
6560
6625
|
//#region src/json-schema-subset/checker/tools/quantum.ts
|
|
6561
|
-
function
|
|
6562
|
-
return new
|
|
6626
|
+
function Gd(e) {
|
|
6627
|
+
return new Kd(e);
|
|
6563
6628
|
}
|
|
6564
|
-
var
|
|
6629
|
+
var Kd = class {
|
|
6565
6630
|
constructor(e) {
|
|
6566
|
-
this.description = new
|
|
6631
|
+
this.description = new Ud(e);
|
|
6567
6632
|
}
|
|
6568
6633
|
get keys() {
|
|
6569
6634
|
return this.description.keys;
|
|
6570
6635
|
}
|
|
6571
6636
|
variable(e) {
|
|
6572
6637
|
let t;
|
|
6573
|
-
return e && (t = this.description.toBundle(e).toInt32()), new
|
|
6638
|
+
return e && (t = this.description.toBundle(e).toInt32()), new qd(this.description, t);
|
|
6574
6639
|
}
|
|
6575
|
-
},
|
|
6640
|
+
}, qd = class {
|
|
6576
6641
|
constructor(e, t) {
|
|
6577
6642
|
this.values = /* @__PURE__ */ new Set(), this.description = e, t !== void 0 && this.values.add(t);
|
|
6578
6643
|
}
|
|
@@ -6593,7 +6658,7 @@ var Wd = class {
|
|
|
6593
6658
|
}
|
|
6594
6659
|
push(e, t) {
|
|
6595
6660
|
let n = /* @__PURE__ */ new Set();
|
|
6596
|
-
for (let r of this.values) for (let [i, a] of
|
|
6661
|
+
for (let r of this.values) for (let [i, a] of lu) if (e & a) {
|
|
6597
6662
|
let e = this.description.toBundle(r);
|
|
6598
6663
|
t(i, e), n.add(e.toInt32());
|
|
6599
6664
|
}
|
|
@@ -6610,11 +6675,11 @@ var Wd = class {
|
|
|
6610
6675
|
};
|
|
6611
6676
|
//#endregion
|
|
6612
6677
|
//#region src/json-schema-subset/checker/tools/range.ts
|
|
6613
|
-
function
|
|
6678
|
+
function Jd(e, t) {
|
|
6614
6679
|
let [n] = e, [r] = t;
|
|
6615
|
-
return n.num < r.num ?
|
|
6680
|
+
return n.num < r.num ? Yd(e, t) : n.num > r.num ? Xd(e, t) : Zd(e, t);
|
|
6616
6681
|
}
|
|
6617
|
-
function
|
|
6682
|
+
function Yd(e, t) {
|
|
6618
6683
|
let [n, r] = e, [i, a] = t;
|
|
6619
6684
|
if (r.num <= i.num) {
|
|
6620
6685
|
let n = r.exclusive, a = i.exclusive;
|
|
@@ -6639,11 +6704,11 @@ function qd(e, t) {
|
|
|
6639
6704
|
let t;
|
|
6640
6705
|
return e && (t = {
|
|
6641
6706
|
fromLeft: !1,
|
|
6642
|
-
range: [
|
|
6707
|
+
range: [Qd(r), a]
|
|
6643
6708
|
}), {
|
|
6644
6709
|
left: {
|
|
6645
6710
|
fromLeft: !0,
|
|
6646
|
-
range: [n,
|
|
6711
|
+
range: [n, Qd(i)]
|
|
6647
6712
|
},
|
|
6648
6713
|
center: [i, r],
|
|
6649
6714
|
right: t
|
|
@@ -6653,16 +6718,16 @@ function qd(e, t) {
|
|
|
6653
6718
|
return {
|
|
6654
6719
|
left: {
|
|
6655
6720
|
fromLeft: !0,
|
|
6656
|
-
range: [n,
|
|
6721
|
+
range: [n, Qd(i)]
|
|
6657
6722
|
},
|
|
6658
6723
|
center: [i, a],
|
|
6659
6724
|
right: {
|
|
6660
6725
|
fromLeft: !0,
|
|
6661
|
-
range: [
|
|
6726
|
+
range: [Qd(a), r]
|
|
6662
6727
|
}
|
|
6663
6728
|
};
|
|
6664
6729
|
}
|
|
6665
|
-
function
|
|
6730
|
+
function Xd(e, t) {
|
|
6666
6731
|
let [n, r] = e, [i, a] = t;
|
|
6667
6732
|
if (n.num >= a.num) {
|
|
6668
6733
|
let r = a.exclusive, i = n.exclusive;
|
|
@@ -6687,11 +6752,11 @@ function Jd(e, t) {
|
|
|
6687
6752
|
let t;
|
|
6688
6753
|
return e && (t = {
|
|
6689
6754
|
fromLeft: !0,
|
|
6690
|
-
range: [
|
|
6755
|
+
range: [Qd(a), r]
|
|
6691
6756
|
}), {
|
|
6692
6757
|
left: {
|
|
6693
6758
|
fromLeft: !1,
|
|
6694
|
-
range: [i,
|
|
6759
|
+
range: [i, Qd(n)]
|
|
6695
6760
|
},
|
|
6696
6761
|
center: [n, a],
|
|
6697
6762
|
right: t
|
|
@@ -6701,23 +6766,23 @@ function Jd(e, t) {
|
|
|
6701
6766
|
return {
|
|
6702
6767
|
left: {
|
|
6703
6768
|
fromLeft: !1,
|
|
6704
|
-
range: [i,
|
|
6769
|
+
range: [i, Qd(n)]
|
|
6705
6770
|
},
|
|
6706
6771
|
center: [n, r],
|
|
6707
6772
|
right: {
|
|
6708
6773
|
fromLeft: !1,
|
|
6709
|
-
range: [
|
|
6774
|
+
range: [Qd(r), a]
|
|
6710
6775
|
}
|
|
6711
6776
|
};
|
|
6712
6777
|
}
|
|
6713
|
-
function
|
|
6778
|
+
function Zd(e, t) {
|
|
6714
6779
|
let [n, r] = e, [i, a] = t, o = n.exclusive, s = i.exclusive, c, l = n;
|
|
6715
6780
|
if (!o && s ? (l = i, c = {
|
|
6716
6781
|
fromLeft: !0,
|
|
6717
|
-
range: [n,
|
|
6782
|
+
range: [n, Qd(i)]
|
|
6718
6783
|
}) : o && !s && (c = {
|
|
6719
6784
|
fromLeft: !1,
|
|
6720
|
-
range: [i,
|
|
6785
|
+
range: [i, Qd(n)]
|
|
6721
6786
|
}), r.num <= a.num) {
|
|
6722
6787
|
let e = !0, t = !1;
|
|
6723
6788
|
if (r.num === a.num) {
|
|
@@ -6728,7 +6793,7 @@ function Yd(e, t) {
|
|
|
6728
6793
|
let t;
|
|
6729
6794
|
return e && (t = {
|
|
6730
6795
|
fromLeft: !1,
|
|
6731
|
-
range: [
|
|
6796
|
+
range: [Qd(r), a]
|
|
6732
6797
|
}), {
|
|
6733
6798
|
left: c,
|
|
6734
6799
|
center: [l, r],
|
|
@@ -6741,11 +6806,11 @@ function Yd(e, t) {
|
|
|
6741
6806
|
center: [l, a],
|
|
6742
6807
|
right: {
|
|
6743
6808
|
fromLeft: !0,
|
|
6744
|
-
range: [
|
|
6809
|
+
range: [Qd(a), r]
|
|
6745
6810
|
}
|
|
6746
6811
|
};
|
|
6747
6812
|
}
|
|
6748
|
-
function
|
|
6813
|
+
function Qd(e) {
|
|
6749
6814
|
return {
|
|
6750
6815
|
num: e.num,
|
|
6751
6816
|
exclusive: !e.exclusive
|
|
@@ -6753,8 +6818,8 @@ function Xd(e) {
|
|
|
6753
6818
|
}
|
|
6754
6819
|
//#endregion
|
|
6755
6820
|
//#region src/json-schema-subset/checker/range.ts
|
|
6756
|
-
var
|
|
6757
|
-
let { left: a, center: o, right: s } =
|
|
6821
|
+
var $d = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
|
|
6822
|
+
let { left: a, center: o, right: s } = Jd([{
|
|
6758
6823
|
num: t,
|
|
6759
6824
|
exclusive: !1
|
|
6760
6825
|
}, {
|
|
@@ -6784,24 +6849,24 @@ var Zd = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
|
|
|
6784
6849
|
intersection: u
|
|
6785
6850
|
};
|
|
6786
6851
|
};
|
|
6787
|
-
function
|
|
6852
|
+
function ef({ left: e, right: t, intersection: n }) {
|
|
6788
6853
|
if (!n) return z.Rejection;
|
|
6789
6854
|
let r = !1, i = !1;
|
|
6790
6855
|
return e && (e.isFrom1 ? r = !0 : i = !0), t && (t.isFrom1 ? r = !0 : i = !0), r && i ? z.Intersection : r ? z.Containing : i ? z.ContainedBy : z.Equals;
|
|
6791
6856
|
}
|
|
6792
6857
|
//#endregion
|
|
6793
6858
|
//#region src/json-schema-subset/checker/array.ts
|
|
6794
|
-
var
|
|
6859
|
+
var tf = $d(0), nf = Gd([
|
|
6795
6860
|
"hasCommon",
|
|
6796
6861
|
"hasExtra1",
|
|
6797
6862
|
"hasExtra2",
|
|
6798
6863
|
"hasRejection",
|
|
6799
6864
|
"hasCommonBroken"
|
|
6800
6865
|
]);
|
|
6801
|
-
function
|
|
6802
|
-
let r =
|
|
6866
|
+
function rf({ calculate: e }, t, n) {
|
|
6867
|
+
let r = tf(t.minItems, t.maxItems, n.minItems, n.maxItems), i = ef(r);
|
|
6803
6868
|
if (i === z.Rejection) return U;
|
|
6804
|
-
let [a, o] =
|
|
6869
|
+
let [a, o] = af(t), [s, c] = af(n), l = Math.max(a.length, s.length) + 1, u = Math.min(l, r.intersection.max), d = nf.variable({}), f = Math.min(t.minItems ?? 0, n.minItems ?? 0);
|
|
6805
6870
|
for (let t = 0; t < u; t++) {
|
|
6806
6871
|
let n = e(a[t] ?? o, s[t] ?? c);
|
|
6807
6872
|
d.push(n, (e, n) => {
|
|
@@ -6841,69 +6906,69 @@ function tf({ calculate: e }, t, n) {
|
|
|
6841
6906
|
}
|
|
6842
6907
|
return p;
|
|
6843
6908
|
}
|
|
6844
|
-
function
|
|
6845
|
-
return Array.isArray(e) ? [e, t ??
|
|
6909
|
+
function af({ items: e, additionalItems: t }) {
|
|
6910
|
+
return Array.isArray(e) ? [e, t ?? qu] : [[], e ?? qu];
|
|
6846
6911
|
}
|
|
6847
6912
|
//#endregion
|
|
6848
6913
|
//#region src/json-schema-subset/checker/cache.ts
|
|
6849
|
-
function
|
|
6914
|
+
function of(e) {
|
|
6850
6915
|
let t = /* @__PURE__ */ new Map();
|
|
6851
6916
|
return (n, r) => {
|
|
6852
|
-
let i =
|
|
6853
|
-
return i ===
|
|
6917
|
+
let i = Yu(n);
|
|
6918
|
+
return i === Yu(r) ? i ? cf(t, n, r, e) : n === r : !1;
|
|
6854
6919
|
};
|
|
6855
6920
|
}
|
|
6856
|
-
function
|
|
6921
|
+
function sf(e) {
|
|
6857
6922
|
let t = /* @__PURE__ */ new Map();
|
|
6858
|
-
return (n, r) =>
|
|
6923
|
+
return (n, r) => cf(t, n, r, e);
|
|
6859
6924
|
}
|
|
6860
|
-
function
|
|
6861
|
-
let i = `${
|
|
6925
|
+
function cf(e, t, n, r) {
|
|
6926
|
+
let i = `${Zu(t)}/${Zu(n)}`, a = e.get(i);
|
|
6862
6927
|
return a === void 0 && e.set(i, a = r(t, n)), a;
|
|
6863
6928
|
}
|
|
6864
6929
|
//#endregion
|
|
6865
6930
|
//#region src/json-schema-subset/checker/enumAndConst.ts
|
|
6866
|
-
function
|
|
6867
|
-
let r =
|
|
6868
|
-
for (let t of r) if (
|
|
6869
|
-
for (let t of i) if (
|
|
6931
|
+
function lf(e, t, n) {
|
|
6932
|
+
let r = df(t), i = df(n), a = !1, o = !1, s = !1;
|
|
6933
|
+
for (let t of r) if (ff(e, i, t) ? s = !0 : a = !0, a && s) break;
|
|
6934
|
+
for (let t of i) if (ff(e, r, t) ? s = !0 : o = !0, o && s) break;
|
|
6870
6935
|
return s ? a && o ? W : a ? V : o ? H : B : U;
|
|
6871
6936
|
}
|
|
6872
|
-
function
|
|
6937
|
+
function uf(e, t) {
|
|
6873
6938
|
let n = !1, r = !1;
|
|
6874
|
-
for (let i of
|
|
6875
|
-
switch (
|
|
6876
|
-
case
|
|
6939
|
+
for (let i of df(e)) {
|
|
6940
|
+
switch (fd(t, i)) {
|
|
6941
|
+
case dd.Valid:
|
|
6877
6942
|
n = !0;
|
|
6878
6943
|
break;
|
|
6879
|
-
case
|
|
6944
|
+
case dd.Invalid:
|
|
6880
6945
|
r = !0;
|
|
6881
6946
|
break;
|
|
6882
|
-
case
|
|
6947
|
+
case dd.Unknown: return uu;
|
|
6883
6948
|
}
|
|
6884
6949
|
if (n && r) break;
|
|
6885
6950
|
}
|
|
6886
6951
|
return n && r ? W : n ? B | H : r ? U : J(t) === q.Never ? B : H;
|
|
6887
6952
|
}
|
|
6888
|
-
function
|
|
6953
|
+
function df({ const: e, enum: t }) {
|
|
6889
6954
|
if (e !== void 0) return [e];
|
|
6890
6955
|
if (t) return t;
|
|
6891
6956
|
throw Error("invalid branch");
|
|
6892
6957
|
}
|
|
6893
|
-
function
|
|
6958
|
+
function ff({ isEquals: e }, t, n) {
|
|
6894
6959
|
for (let r of t) if (e(r, n)) return !0;
|
|
6895
6960
|
return !1;
|
|
6896
6961
|
}
|
|
6897
6962
|
//#endregion
|
|
6898
6963
|
//#region src/json-schema-subset/checker/equals.ts
|
|
6899
|
-
function
|
|
6964
|
+
function pf(e) {
|
|
6900
6965
|
function t(t, n) {
|
|
6901
6966
|
let i = e.isExtendsSchema(t), a = e.isExtendsSchema(n);
|
|
6902
6967
|
return i || a ? e.equals(t, n) : r(t, n);
|
|
6903
6968
|
}
|
|
6904
6969
|
let n = /* @__PURE__ */ new Map();
|
|
6905
6970
|
function r(e, t) {
|
|
6906
|
-
let r =
|
|
6971
|
+
let r = Zu(e), a = Zu(t);
|
|
6907
6972
|
if (r === a) return !0;
|
|
6908
6973
|
let o = `${r}/${a}`, s = n.get(o);
|
|
6909
6974
|
return s === void 0 && (s = i(e, t), n.set(o, s)), s;
|
|
@@ -6920,25 +6985,25 @@ function df(e) {
|
|
|
6920
6985
|
return !0;
|
|
6921
6986
|
}
|
|
6922
6987
|
function a(e, t) {
|
|
6923
|
-
return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 :
|
|
6988
|
+
return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 : Xu(e) && Xu(t) ? r(e, t) : i(e, t);
|
|
6924
6989
|
}
|
|
6925
6990
|
return t;
|
|
6926
6991
|
}
|
|
6927
6992
|
//#endregion
|
|
6928
6993
|
//#region src/json-schema-subset/checker/numeric/integerNormalizer.ts
|
|
6929
|
-
function
|
|
6930
|
-
let t =
|
|
6994
|
+
function mf(e) {
|
|
6995
|
+
let t = xf(e), n = e.multipleOf ?? 1, r = gf(t, n);
|
|
6931
6996
|
return r ? {
|
|
6932
6997
|
multipleOf: n,
|
|
6933
6998
|
range: r
|
|
6934
6999
|
} : null;
|
|
6935
7000
|
}
|
|
6936
|
-
function
|
|
7001
|
+
function hf([e, t]) {
|
|
6937
7002
|
return !(e.num !== t.num || e.exclusive || t.exclusive);
|
|
6938
7003
|
}
|
|
6939
|
-
function
|
|
7004
|
+
function gf(e, t) {
|
|
6940
7005
|
if (!e) return;
|
|
6941
|
-
let [n, r] = e, i =
|
|
7006
|
+
let [n, r] = e, i = _f(n.num, t), a = vf(r.num, t);
|
|
6942
7007
|
if (i === n.num && n.exclusive && (i += t), a === r.num && r.exclusive && (a -= t), !(i > a) && (i !== a || i !== Infinity && i !== -Infinity)) return [{
|
|
6943
7008
|
num: i,
|
|
6944
7009
|
exclusive: !1
|
|
@@ -6947,29 +7012,29 @@ function mf(e, t) {
|
|
|
6947
7012
|
exclusive: !1
|
|
6948
7013
|
}];
|
|
6949
7014
|
}
|
|
6950
|
-
function
|
|
7015
|
+
function _f(e, t) {
|
|
6951
7016
|
return Math.ceil(e / t) * t;
|
|
6952
7017
|
}
|
|
6953
|
-
function
|
|
7018
|
+
function vf(e, t) {
|
|
6954
7019
|
return Math.floor(e / t) * t;
|
|
6955
7020
|
}
|
|
6956
7021
|
//#endregion
|
|
6957
7022
|
//#region src/json-schema-subset/checker/numeric/float.ts
|
|
6958
|
-
function
|
|
6959
|
-
let { left: n, right: r, center: i } =
|
|
7023
|
+
function yf(e, t) {
|
|
7024
|
+
let { left: n, right: r, center: i } = Jd(xf(e), xf(t));
|
|
6960
7025
|
if (!i) return U;
|
|
6961
7026
|
let a = !1, o = !1;
|
|
6962
7027
|
return n && (n.fromLeft ? a = !0 : o = !0), r && (r.fromLeft ? a = !0 : o = !0), a && o ? W : a ? V : o ? H : B;
|
|
6963
7028
|
}
|
|
6964
|
-
function
|
|
6965
|
-
let n =
|
|
7029
|
+
function bf(e, t) {
|
|
7030
|
+
let n = xf(e), r = mf(t);
|
|
6966
7031
|
if (!r) return V;
|
|
6967
|
-
let i =
|
|
7032
|
+
let i = Jd(n, r.range), a = gf(i.center, r.multipleOf), o = Sf(i.left, r.multipleOf), s = Sf(i.right, r.multipleOf);
|
|
6968
7033
|
if (!i.center) return U;
|
|
6969
7034
|
let c = !1, l = !1;
|
|
6970
|
-
return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !
|
|
7035
|
+
return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !hf(i.center)) && (c = !0), o && (l = !0), s && (l = !0), c && l ? W : c ? V : l ? H : B;
|
|
6971
7036
|
}
|
|
6972
|
-
function
|
|
7037
|
+
function xf(e) {
|
|
6973
7038
|
let t, n;
|
|
6974
7039
|
return t = e.exclusiveMinimum === void 0 ? e.minimum === void 0 ? {
|
|
6975
7040
|
num: -Infinity,
|
|
@@ -6991,84 +7056,84 @@ function yf(e) {
|
|
|
6991
7056
|
exclusive: !0
|
|
6992
7057
|
}, [t, n];
|
|
6993
7058
|
}
|
|
6994
|
-
function
|
|
6995
|
-
if (e && !e.fromLeft) return
|
|
7059
|
+
function Sf(e, t) {
|
|
7060
|
+
if (e && !e.fromLeft) return gf(e.range, t);
|
|
6996
7061
|
}
|
|
6997
7062
|
//#endregion
|
|
6998
7063
|
//#region src/json-schema-subset/checker/numeric/integer.ts
|
|
6999
|
-
function
|
|
7000
|
-
let n =
|
|
7064
|
+
function Cf(e, t) {
|
|
7065
|
+
let n = mf(e), r = mf(t);
|
|
7001
7066
|
if (!n && !r) return B;
|
|
7002
7067
|
if (!n) return H;
|
|
7003
7068
|
if (!r) return V;
|
|
7004
|
-
let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c =
|
|
7005
|
-
if (c.center && (u =
|
|
7069
|
+
let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c = Jd(i, o), l, u = 0;
|
|
7070
|
+
if (c.center && (u = Tf(a, s), l = gf(c.center, u)), !l) return U;
|
|
7006
7071
|
let d = !1, f = !1, { left: p, right: ee } = c;
|
|
7007
|
-
return p &&
|
|
7072
|
+
return p && gf(p.range, p.fromLeft ? a : s) && (p.fromLeft ? d = !0 : f = !0), ee && gf(ee.range, ee.fromLeft ? a : s) && (ee.fromLeft ? d = !0 : f = !0), d ||= wf(n, l, u), f ||= wf(r, l, u), d && f ? W : d ? V : f ? H : B;
|
|
7008
7073
|
}
|
|
7009
|
-
function
|
|
7010
|
-
let i =
|
|
7011
|
-
if (
|
|
7012
|
-
let a =
|
|
7074
|
+
function wf({ range: e, multipleOf: t }, n, r) {
|
|
7075
|
+
let i = Jd(e, n);
|
|
7076
|
+
if (gf(i.left?.range, t) || gf(i.right?.range, t)) return !0;
|
|
7077
|
+
let a = gf(i.center, t);
|
|
7013
7078
|
if (!a) return !1;
|
|
7014
|
-
let o =
|
|
7015
|
-
return
|
|
7079
|
+
let o = Df(n);
|
|
7080
|
+
return Df(a) > o || o !== 1 && t < r;
|
|
7016
7081
|
}
|
|
7017
|
-
function
|
|
7018
|
-
return e * t /
|
|
7082
|
+
function Tf(e, t) {
|
|
7083
|
+
return e * t / Ef(e, t);
|
|
7019
7084
|
}
|
|
7020
|
-
function
|
|
7021
|
-
return e === 0 ? t :
|
|
7085
|
+
function Ef(e, t) {
|
|
7086
|
+
return e === 0 ? t : Ef(t % e, e);
|
|
7022
7087
|
}
|
|
7023
|
-
function
|
|
7088
|
+
function Df(e) {
|
|
7024
7089
|
if (!e) return 0;
|
|
7025
7090
|
let [t, n] = e;
|
|
7026
7091
|
return n.num - t.num + 1;
|
|
7027
7092
|
}
|
|
7028
7093
|
//#endregion
|
|
7029
7094
|
//#region src/json-schema-subset/checker/numeric/checker.ts
|
|
7030
|
-
function
|
|
7031
|
-
if (
|
|
7032
|
-
let n =
|
|
7033
|
-
return n && r ?
|
|
7095
|
+
function Of(e, t) {
|
|
7096
|
+
if (kf(e) || kf(t)) return uu;
|
|
7097
|
+
let n = Af(e), r = Af(t);
|
|
7098
|
+
return n && r ? yf(e, t) : n ? bf(e, t) : r ? bu(bf(t, e)) : Cf(e, t);
|
|
7034
7099
|
}
|
|
7035
|
-
function
|
|
7100
|
+
function kf(e) {
|
|
7036
7101
|
let { multipleOf: t } = e;
|
|
7037
7102
|
return t === void 0 ? !1 : !Number.isInteger(t) || t < 0;
|
|
7038
7103
|
}
|
|
7039
|
-
function
|
|
7104
|
+
function Af(e) {
|
|
7040
7105
|
let { multipleOf: t } = e;
|
|
7041
7106
|
return !(t !== void 0 && Number.isInteger(t) || e.type === "integer");
|
|
7042
7107
|
}
|
|
7043
7108
|
//#endregion
|
|
7044
7109
|
//#region src/json-schema-subset/checker/object.ts
|
|
7045
|
-
var
|
|
7110
|
+
var jf = $d(0), Mf = Gd([
|
|
7046
7111
|
"hasCommonInRequired",
|
|
7047
7112
|
"hasCommonOutRequired",
|
|
7048
7113
|
"hasExtra1",
|
|
7049
7114
|
"hasExtra2",
|
|
7050
7115
|
"hasRejection"
|
|
7051
7116
|
]);
|
|
7052
|
-
function
|
|
7053
|
-
if (
|
|
7054
|
-
let r =
|
|
7117
|
+
function Nf(e, t, n) {
|
|
7118
|
+
if (Pf(t, n)) return U;
|
|
7119
|
+
let r = Ff(t, n);
|
|
7055
7120
|
if (!r) return U;
|
|
7056
|
-
let i =
|
|
7121
|
+
let i = Vf(t), a = Vf(n), o = (t) => {
|
|
7057
7122
|
let n = i(t), r = a(t);
|
|
7058
|
-
return
|
|
7059
|
-
}, { commonRequired: s, extraRequired1: c, extraRequired2: l } = r, u =
|
|
7060
|
-
for (let e of [...s].toSorted()) u.push(o(e),
|
|
7061
|
-
for (let e of [...c].toSorted()) u.push(o(e),
|
|
7062
|
-
for (let e of [...l].toSorted()) u.push(o(e),
|
|
7123
|
+
return Hf(n, r) ? e.calculate(n, r) : 0;
|
|
7124
|
+
}, { commonRequired: s, extraRequired1: c, extraRequired2: l } = r, u = Mf.variable({});
|
|
7125
|
+
for (let e of [...s].toSorted()) u.push(o(e), Lf);
|
|
7126
|
+
for (let e of [...c].toSorted()) u.push(o(e), Rf);
|
|
7127
|
+
for (let e of [...l].toSorted()) u.push(o(e), zf);
|
|
7063
7128
|
let { hasOptional1: d, hasOptional2: f } = r;
|
|
7064
7129
|
if (d || f) {
|
|
7065
|
-
let r =
|
|
7066
|
-
for (let e of [...
|
|
7130
|
+
let r = Bf(d, f);
|
|
7131
|
+
for (let e of [...If(t, n)].toSorted()) {
|
|
7067
7132
|
let t = o(e);
|
|
7068
7133
|
t !== 0 && u.push(t, r);
|
|
7069
7134
|
}
|
|
7070
|
-
let i = t.additionalProperties ??
|
|
7071
|
-
if (
|
|
7135
|
+
let i = t.additionalProperties ?? qu, a = n.additionalProperties ?? qu;
|
|
7136
|
+
if (Hf(i, a)) {
|
|
7072
7137
|
let t = e.calculate(i, a);
|
|
7073
7138
|
u.push(t, r);
|
|
7074
7139
|
}
|
|
@@ -7080,10 +7145,10 @@ function jf(e, t, n) {
|
|
|
7080
7145
|
for (let { hasExtra1: e, hasExtra2: t, hasCommonInRequired: n, hasCommonOutRequired: r, hasRejection: i } of u) ee |= !n && p > 0 || !r && p === 0 || i ? U : e && t ? W : e ? V : t ? H : B;
|
|
7081
7146
|
return ee;
|
|
7082
7147
|
}
|
|
7083
|
-
function
|
|
7084
|
-
return
|
|
7148
|
+
function Pf(e, t) {
|
|
7149
|
+
return ef(jf(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) === z.Rejection;
|
|
7085
7150
|
}
|
|
7086
|
-
function
|
|
7151
|
+
function Ff(e, t) {
|
|
7087
7152
|
let n = new Set(e.required), r = new Set(t.required), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = n.size, s = r.size;
|
|
7088
7153
|
for (let e of n) r.has(e) && i.add(e), a.add(e);
|
|
7089
7154
|
for (let e of r) n.has(e) && i.add(e), a.add(e);
|
|
@@ -7099,7 +7164,7 @@ function Nf(e, t) {
|
|
|
7099
7164
|
hasOptional2: u > s
|
|
7100
7165
|
};
|
|
7101
7166
|
}
|
|
7102
|
-
function
|
|
7167
|
+
function If(e, t) {
|
|
7103
7168
|
let n = new Set(e.required), r = e.properties, i = t.properties, a = e.required, o = t.required;
|
|
7104
7169
|
if (r) for (let e in r) n.add(e);
|
|
7105
7170
|
if (i) for (let e in i) n.add(e);
|
|
@@ -7107,7 +7172,7 @@ function Pf(e, t) {
|
|
|
7107
7172
|
if (o) for (let e of o) n.delete(e);
|
|
7108
7173
|
return n;
|
|
7109
7174
|
}
|
|
7110
|
-
var
|
|
7175
|
+
var Lf = (e, t) => {
|
|
7111
7176
|
switch (e) {
|
|
7112
7177
|
case z.Equals:
|
|
7113
7178
|
t.hasCommonInRequired = !0;
|
|
@@ -7123,7 +7188,7 @@ var Ff = (e, t) => {
|
|
|
7123
7188
|
break;
|
|
7124
7189
|
case z.Rejection: t.hasRejection = !0;
|
|
7125
7190
|
}
|
|
7126
|
-
},
|
|
7191
|
+
}, Rf = (e, t) => {
|
|
7127
7192
|
switch (e) {
|
|
7128
7193
|
case z.Equals:
|
|
7129
7194
|
case z.ContainedBy:
|
|
@@ -7135,7 +7200,7 @@ var Ff = (e, t) => {
|
|
|
7135
7200
|
break;
|
|
7136
7201
|
case z.Rejection: t.hasRejection = !0;
|
|
7137
7202
|
}
|
|
7138
|
-
},
|
|
7203
|
+
}, zf = (e, t) => {
|
|
7139
7204
|
switch (e) {
|
|
7140
7205
|
case z.Equals:
|
|
7141
7206
|
case z.Containing:
|
|
@@ -7147,7 +7212,7 @@ var Ff = (e, t) => {
|
|
|
7147
7212
|
break;
|
|
7148
7213
|
case z.Rejection: t.hasRejection = !0;
|
|
7149
7214
|
}
|
|
7150
|
-
},
|
|
7215
|
+
}, Bf = (e, t) => (n, r) => {
|
|
7151
7216
|
if (r.hasRejection) return;
|
|
7152
7217
|
let i = !1, a = !1, o = !1;
|
|
7153
7218
|
switch (n) {
|
|
@@ -7167,7 +7232,7 @@ var Ff = (e, t) => {
|
|
|
7167
7232
|
}
|
|
7168
7233
|
e && i && (r.hasExtra1 = !0), t && a && (r.hasExtra2 = !0), e && t && o && (r.hasCommonOutRequired = !0);
|
|
7169
7234
|
};
|
|
7170
|
-
function
|
|
7235
|
+
function Vf(e) {
|
|
7171
7236
|
let t = e.properties, n = e.propertyNames, r = e.additionalProperties, i = [];
|
|
7172
7237
|
if (e.patternProperties) for (let t in e.patternProperties) {
|
|
7173
7238
|
let n = e.patternProperties[t], r = new RegExp(t, "i");
|
|
@@ -7177,41 +7242,41 @@ function zf(e) {
|
|
|
7177
7242
|
});
|
|
7178
7243
|
}
|
|
7179
7244
|
return (e) => {
|
|
7180
|
-
if (n &&
|
|
7245
|
+
if (n && fd(n, e) === dd.Invalid) return Ju;
|
|
7181
7246
|
for (let { pattern: t, schema: n } of i) if (t.test(e)) return n;
|
|
7182
|
-
return ((t && t[e]) ?? r) ||
|
|
7247
|
+
return ((t && t[e]) ?? r) || qu;
|
|
7183
7248
|
};
|
|
7184
7249
|
}
|
|
7185
|
-
function
|
|
7250
|
+
function Hf(e, t) {
|
|
7186
7251
|
let n = J(e), r = J(t);
|
|
7187
7252
|
return n !== q.Never || r !== q.Never;
|
|
7188
7253
|
}
|
|
7189
7254
|
//#endregion
|
|
7190
7255
|
//#region src/json-schema-subset/checker/string.ts
|
|
7191
|
-
var
|
|
7192
|
-
function
|
|
7256
|
+
var Uf = $d(0);
|
|
7257
|
+
function Wf(e, t) {
|
|
7193
7258
|
if (t.format && !e.format) return V;
|
|
7194
|
-
if (e.format && t.format && e.format !== t.format) return
|
|
7195
|
-
let n =
|
|
7259
|
+
if (e.format && t.format && e.format !== t.format) return uu;
|
|
7260
|
+
let n = ef(Uf(e.minLength, e.maxLength, t.minLength, t.maxLength)), r = !!e.pattern, i = !!t.pattern;
|
|
7196
7261
|
switch (n) {
|
|
7197
7262
|
case z.Rejection: return U;
|
|
7198
|
-
case z.Containing: return r ?
|
|
7199
|
-
case z.ContainedBy: return i ?
|
|
7200
|
-
case z.Equals: return r && i ? e.pattern === t.pattern ? B :
|
|
7201
|
-
case z.Intersection: return r && i ?
|
|
7263
|
+
case z.Containing: return r ? uu : V;
|
|
7264
|
+
case z.ContainedBy: return i ? uu : H;
|
|
7265
|
+
case z.Equals: return r && i ? e.pattern === t.pattern ? B : uu : r ? B | H : i ? B | V : B;
|
|
7266
|
+
case z.Intersection: return r && i ? uu : r ? W | U | H : i ? W | U | V : W;
|
|
7202
7267
|
}
|
|
7203
7268
|
}
|
|
7204
7269
|
//#endregion
|
|
7205
7270
|
//#region src/json-schema-subset/checker/checker.ts
|
|
7206
|
-
function
|
|
7207
|
-
let r = {}, i = [], a =
|
|
7208
|
-
r.isEquals =
|
|
7271
|
+
function Gf(e, t, n) {
|
|
7272
|
+
let r = {}, i = [], a = sf(qf(e, r)), o = Kf(), s = pf(e);
|
|
7273
|
+
r.isEquals = of(cu), r.calculate = ku({
|
|
7209
7274
|
describe: o,
|
|
7210
7275
|
equals: s,
|
|
7211
7276
|
calculate: a,
|
|
7212
7277
|
observeCalculation: (e, t, n, r) => {
|
|
7213
|
-
if (!
|
|
7214
|
-
let a = r ?
|
|
7278
|
+
if (!Yf(r ? bu(n) : n)) return;
|
|
7279
|
+
let a = r ? Xf(t, e) : Xf(e, t);
|
|
7215
7280
|
a && i.push(a);
|
|
7216
7281
|
}
|
|
7217
7282
|
}), Object.freeze(r);
|
|
@@ -7221,34 +7286,34 @@ function Uf(e, t, n) {
|
|
|
7221
7286
|
expression: c
|
|
7222
7287
|
};
|
|
7223
7288
|
}
|
|
7224
|
-
var
|
|
7289
|
+
var Kf = () => (e) => {
|
|
7225
7290
|
let t;
|
|
7226
7291
|
switch (J(e)) {
|
|
7227
7292
|
case q.Not:
|
|
7228
7293
|
t = {
|
|
7229
|
-
kind:
|
|
7294
|
+
kind: Ou.Not,
|
|
7230
7295
|
expression: e.not
|
|
7231
7296
|
};
|
|
7232
7297
|
break;
|
|
7233
7298
|
case q.Combination:
|
|
7234
7299
|
if ("allOf" in e) t = {
|
|
7235
|
-
kind:
|
|
7236
|
-
expressions:
|
|
7300
|
+
kind: Ou.AllOf,
|
|
7301
|
+
expressions: Jf(e.allOf, q.Any)
|
|
7237
7302
|
};
|
|
7238
7303
|
else if ("anyOf" in e) t = {
|
|
7239
|
-
kind:
|
|
7240
|
-
expressions:
|
|
7304
|
+
kind: Ou.AnyOf,
|
|
7305
|
+
expressions: Jf(e.anyOf, q.Never)
|
|
7241
7306
|
};
|
|
7242
7307
|
else if ("oneOf" in e) t = {
|
|
7243
|
-
kind:
|
|
7244
|
-
expressions:
|
|
7308
|
+
kind: Ou.OneOf,
|
|
7309
|
+
expressions: Jf(e.oneOf, q.Never)
|
|
7245
7310
|
};
|
|
7246
7311
|
else throw Error(`invalid combination JSON Schema: ${JSON.stringify(e)}`);
|
|
7247
7312
|
break;
|
|
7248
|
-
default: t = { kind:
|
|
7313
|
+
default: t = { kind: Ou.Leaf };
|
|
7249
7314
|
}
|
|
7250
7315
|
return t;
|
|
7251
|
-
},
|
|
7316
|
+
}, qf = (e, t) => (n, r) => {
|
|
7252
7317
|
let i = J(n), a = J(r);
|
|
7253
7318
|
if (i === q.Extends || a === q.Extends) return e.calculate(n, r);
|
|
7254
7319
|
switch (i) {
|
|
@@ -7259,28 +7324,28 @@ var Wf = () => (e) => {
|
|
|
7259
7324
|
case q.Any: return H;
|
|
7260
7325
|
case q.Never: return V;
|
|
7261
7326
|
}
|
|
7262
|
-
if (i === q.EnumOrConst && a === q.EnumOrConst) return
|
|
7263
|
-
if (i === q.EnumOrConst) return
|
|
7264
|
-
if (a === q.EnumOrConst) return
|
|
7327
|
+
if (i === q.EnumOrConst && a === q.EnumOrConst) return lf(t, n, r);
|
|
7328
|
+
if (i === q.EnumOrConst) return uf(n, r);
|
|
7329
|
+
if (a === q.EnumOrConst) return bu(uf(r, n));
|
|
7265
7330
|
if (i !== a) return U;
|
|
7266
7331
|
switch (i) {
|
|
7267
7332
|
case q.Null: return B;
|
|
7268
|
-
case q.Numeric: return
|
|
7269
|
-
case q.String: return
|
|
7333
|
+
case q.Numeric: return Of(n, r);
|
|
7334
|
+
case q.String: return Wf(n, r);
|
|
7270
7335
|
case q.Boolean: return B;
|
|
7271
|
-
case q.Object: return
|
|
7272
|
-
case q.Array: return
|
|
7336
|
+
case q.Object: return Nf(t, n, r);
|
|
7337
|
+
case q.Array: return rf(t, n, r);
|
|
7273
7338
|
default: throw Error(`invalid kind ${i}`);
|
|
7274
7339
|
}
|
|
7275
7340
|
};
|
|
7276
|
-
function
|
|
7341
|
+
function Jf(e, t) {
|
|
7277
7342
|
return e.filter((e) => J(e) !== t);
|
|
7278
7343
|
}
|
|
7279
|
-
function
|
|
7280
|
-
return !
|
|
7344
|
+
function Yf(e) {
|
|
7345
|
+
return !du(e) && !pu(e) && (fu(e) || hu(e) || mu(e));
|
|
7281
7346
|
}
|
|
7282
|
-
function
|
|
7283
|
-
let n =
|
|
7347
|
+
function Xf(e, t) {
|
|
7348
|
+
let n = Qu(t);
|
|
7284
7349
|
if (!n) return;
|
|
7285
7350
|
let r = J(e), i = J(t);
|
|
7286
7351
|
if (r !== i) return [...n, "type"];
|
|
@@ -7315,12 +7380,12 @@ function Jf(e, t) {
|
|
|
7315
7380
|
}
|
|
7316
7381
|
//#endregion
|
|
7317
7382
|
//#region src/json-schema-subset/extends/extendsContext.ts
|
|
7318
|
-
var
|
|
7383
|
+
var Zf = class e {
|
|
7319
7384
|
constructor(e = []) {
|
|
7320
7385
|
this.extendsSchemaClasses = Object.freeze([...e]);
|
|
7321
7386
|
}
|
|
7322
7387
|
tryCompiledExtendsSchema(e, t) {
|
|
7323
|
-
for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(
|
|
7388
|
+
for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(iu(), e, t);
|
|
7324
7389
|
return null;
|
|
7325
7390
|
}
|
|
7326
7391
|
isExtendsSchema(e) {
|
|
@@ -7330,7 +7395,7 @@ var Yf = class e {
|
|
|
7330
7395
|
calculate(t, n) {
|
|
7331
7396
|
let r = !(t instanceof this.findMatchedClass(t, n)), i = 0, a;
|
|
7332
7397
|
a = r ? n.compare(t) : t.compare(n);
|
|
7333
|
-
for (let t of a) r && (t = e.swap(t)), i |=
|
|
7398
|
+
for (let t of a) r && (t = e.swap(t)), i |= gu(t);
|
|
7334
7399
|
return i;
|
|
7335
7400
|
}
|
|
7336
7401
|
equals(e, t) {
|
|
@@ -7350,35 +7415,35 @@ var Yf = class e {
|
|
|
7350
7415
|
};
|
|
7351
7416
|
//#endregion
|
|
7352
7417
|
//#region src/json-schema-subset/preprocessing.ts
|
|
7353
|
-
function
|
|
7418
|
+
function Qf(e, t, n = !1) {
|
|
7354
7419
|
let r = t(e);
|
|
7355
7420
|
if (Array.isArray(r)) {
|
|
7356
7421
|
let e = [];
|
|
7357
|
-
throw
|
|
7422
|
+
throw ep(e, r, "$"), new Au(e);
|
|
7358
7423
|
}
|
|
7359
7424
|
let { schema: i, warns: a } = r;
|
|
7360
7425
|
if (n && a.length > 0) {
|
|
7361
7426
|
console.warn(`found ${a.length} warns after compile schema`);
|
|
7362
|
-
for (let e of a) console.warn(
|
|
7427
|
+
for (let e of a) console.warn(Mu(e));
|
|
7363
7428
|
}
|
|
7364
7429
|
return i;
|
|
7365
7430
|
}
|
|
7366
|
-
function
|
|
7431
|
+
function $f(e, t, n, r = !1) {
|
|
7367
7432
|
let i = n(e), a = n(t);
|
|
7368
7433
|
if (Array.isArray(i) || Array.isArray(a)) {
|
|
7369
7434
|
let e = [];
|
|
7370
|
-
throw Array.isArray(i) &&
|
|
7435
|
+
throw Array.isArray(i) && ep(e, i, "$1"), Array.isArray(a) && ep(e, a, "$2"), new Au(e);
|
|
7371
7436
|
}
|
|
7372
7437
|
let { schema: o, warns: s } = i, { schema: c, warns: l } = a;
|
|
7373
7438
|
if (r) {
|
|
7374
7439
|
s.length > 0 && console.warn(`found ${s.length} warns after compile superSchema`);
|
|
7375
|
-
for (let e of s) console.warn(
|
|
7440
|
+
for (let e of s) console.warn(Mu(e));
|
|
7376
7441
|
l.length > 0 && console.warn(`found ${l.length} warns after compile subSchema`);
|
|
7377
|
-
for (let e of l) console.warn(
|
|
7442
|
+
for (let e of l) console.warn(Mu(e));
|
|
7378
7443
|
}
|
|
7379
7444
|
return [o, c];
|
|
7380
7445
|
}
|
|
7381
|
-
function
|
|
7446
|
+
function ep(e, t, n) {
|
|
7382
7447
|
for (let r of t) {
|
|
7383
7448
|
let t = {
|
|
7384
7449
|
...r,
|
|
@@ -7389,60 +7454,60 @@ function Qf(e, t, n) {
|
|
|
7389
7454
|
}
|
|
7390
7455
|
//#endregion
|
|
7391
7456
|
//#region src/json-schema-subset/global.ts
|
|
7392
|
-
var
|
|
7457
|
+
var tp = Object.freeze({
|
|
7393
7458
|
True: 0,
|
|
7394
7459
|
False: 1,
|
|
7395
7460
|
Unknown: 2
|
|
7396
7461
|
});
|
|
7397
|
-
function
|
|
7398
|
-
let n = new
|
|
7462
|
+
function np({ extendsSchemaClasses: e, delegate: t } = {}) {
|
|
7463
|
+
let n = new Zf(e);
|
|
7399
7464
|
return Object.freeze({
|
|
7400
|
-
compile: (e, r, i) =>
|
|
7465
|
+
compile: (e, r, i) => Qf(e, (e) => zd(e, n, r, t), i),
|
|
7401
7466
|
isSubset: (e, r, i = !1) => {
|
|
7402
|
-
let [a, o] =
|
|
7403
|
-
return l && !u ? { result:
|
|
7467
|
+
let [a, o] = $f(e, r, (e) => zd(e, n, void 0, t), i), { errorPath: s, expression: c } = Gf(n, a, o), l = du(c) || pu(c), u = fu(c) || hu(c) || mu(c);
|
|
7468
|
+
return l && !u ? { result: tp.True } : !l && u ? {
|
|
7404
7469
|
errorPath: s,
|
|
7405
|
-
result:
|
|
7406
|
-
} : { result:
|
|
7470
|
+
result: tp.False
|
|
7471
|
+
} : { result: tp.Unknown };
|
|
7407
7472
|
}
|
|
7408
7473
|
});
|
|
7409
7474
|
}
|
|
7410
7475
|
//#endregion
|
|
7411
7476
|
//#region ../../node_modules/.bun/@wopjs+cast@0.1.16/node_modules/@wopjs/cast/dist/index.mjs
|
|
7412
|
-
var
|
|
7477
|
+
var rp = (e) => typeof e == "string", ip = Array.isArray, ap = (e) => typeof e == "object" && !!e, op = (e) => ap(e) && !ip(e), sp = (e) => op(e) ? e : void 0;
|
|
7413
7478
|
//#endregion
|
|
7414
7479
|
//#region src/manifest/common/schemaComparer.ts
|
|
7415
|
-
function
|
|
7416
|
-
return
|
|
7480
|
+
function cp(e) {
|
|
7481
|
+
return sp(e)?.type === "string";
|
|
7417
7482
|
}
|
|
7418
|
-
function
|
|
7419
|
-
let t =
|
|
7420
|
-
if (t == null || n == null || t.packageId != null && !
|
|
7483
|
+
function lp(e) {
|
|
7484
|
+
let t = sp(e), n = sp(t?.error);
|
|
7485
|
+
if (t == null || n == null || t.packageId != null && !rp(t.packageId) || n.message != null && !rp(n.message)) throw TypeError("Invalid schema comparison context.");
|
|
7421
7486
|
}
|
|
7422
|
-
function
|
|
7423
|
-
return e == null ? { error: {} } : (
|
|
7487
|
+
function up(e) {
|
|
7488
|
+
return e == null ? { error: {} } : (lp(e), e);
|
|
7424
7489
|
}
|
|
7425
|
-
var
|
|
7490
|
+
var dp = class e {
|
|
7426
7491
|
static setError(t, n, r) {
|
|
7427
7492
|
t instanceof e ? t.context.error.message = r : n instanceof e && (n.context.error.message = r);
|
|
7428
7493
|
}
|
|
7429
7494
|
constructor(e, t, n) {
|
|
7430
|
-
this.id = e, this.value = t, this.context =
|
|
7495
|
+
this.id = e, this.value = t, this.context = up(n);
|
|
7431
7496
|
}
|
|
7432
7497
|
compare(e) {
|
|
7433
|
-
return
|
|
7498
|
+
return Xu(e) && J(e) === q.Any ? [z.ContainedBy] : this.compareImpl(e);
|
|
7434
7499
|
}
|
|
7435
|
-
},
|
|
7500
|
+
}, fp = class e extends dp {
|
|
7436
7501
|
static isMatch(e) {
|
|
7437
|
-
let t =
|
|
7438
|
-
return Array.isArray(t) && t.every((e) =>
|
|
7502
|
+
let t = sp(e)?.enum;
|
|
7503
|
+
return Array.isArray(t) && t.every((e) => rp(e));
|
|
7439
7504
|
}
|
|
7440
7505
|
constructor(t, n, r) {
|
|
7441
7506
|
if (!e.isMatch(n)) throw TypeError("Invalid single-select schema.");
|
|
7442
7507
|
super(t, n, r);
|
|
7443
7508
|
}
|
|
7444
7509
|
compareImpl(t) {
|
|
7445
|
-
if (
|
|
7510
|
+
if (cp(t)) return [z.ContainedBy];
|
|
7446
7511
|
if (t instanceof e) {
|
|
7447
7512
|
let e = new Set(this.value.enum), n = z.Equals;
|
|
7448
7513
|
for (let r of t.value.enum) e.has(r) || (n = z.ContainedBy), e.delete(r);
|
|
@@ -7461,56 +7526,56 @@ var lp = class e {
|
|
|
7461
7526
|
}
|
|
7462
7527
|
return !1;
|
|
7463
7528
|
}
|
|
7464
|
-
},
|
|
7529
|
+
}, pp = class e extends dp {
|
|
7465
7530
|
static isMatch(e) {
|
|
7466
|
-
return
|
|
7531
|
+
return sp(e)?.contentMediaType === "oomol/bin";
|
|
7467
7532
|
}
|
|
7468
7533
|
constructor(t, n, r) {
|
|
7469
7534
|
if (!e.isMatch(n)) throw TypeError("Invalid binary schema.");
|
|
7470
7535
|
super(t, n, r);
|
|
7471
7536
|
}
|
|
7472
7537
|
compareImpl(t) {
|
|
7473
|
-
return t instanceof e ? [z.Equals] : (
|
|
7538
|
+
return t instanceof e ? [z.Equals] : (dp.setError(this, t, "edgeError.binDiffType"), [z.Rejection]);
|
|
7474
7539
|
}
|
|
7475
7540
|
equals(t) {
|
|
7476
7541
|
return t instanceof e;
|
|
7477
7542
|
}
|
|
7478
|
-
},
|
|
7543
|
+
}, mp = class e extends dp {
|
|
7479
7544
|
static isMatch(e) {
|
|
7480
|
-
return
|
|
7545
|
+
return sp(e)?.contentMediaType === "oomol/artifact";
|
|
7481
7546
|
}
|
|
7482
7547
|
constructor(t, n, r) {
|
|
7483
7548
|
if (!e.isMatch(n)) throw TypeError("Invalid Artifact schema.");
|
|
7484
7549
|
super(t, n, r);
|
|
7485
7550
|
}
|
|
7486
7551
|
compareImpl(t) {
|
|
7487
|
-
return t instanceof e ? [z.Equals] : (
|
|
7552
|
+
return t instanceof e ? [z.Equals] : (dp.setError(this, t, "edgeError.artifactDiffType"), [z.Rejection]);
|
|
7488
7553
|
}
|
|
7489
7554
|
equals(t) {
|
|
7490
7555
|
return t instanceof e;
|
|
7491
7556
|
}
|
|
7492
7557
|
};
|
|
7493
|
-
function
|
|
7494
|
-
return
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7558
|
+
function hp() {
|
|
7559
|
+
return np({ extendsSchemaClasses: [
|
|
7560
|
+
fp,
|
|
7561
|
+
pp,
|
|
7562
|
+
mp
|
|
7498
7563
|
] });
|
|
7499
7564
|
}
|
|
7500
|
-
|
|
7565
|
+
hp();
|
|
7501
7566
|
//#endregion
|
|
7502
7567
|
//#region src/control/common/eventSources.ts
|
|
7503
|
-
var
|
|
7568
|
+
var gp = S().min(1).max(256), _p = S().regex(/^[a-z][a-z0-9_.]{0,127}$/), vp = S().trim().min(1).max(128), yp = O({
|
|
7504
7569
|
version: j(1),
|
|
7505
|
-
sourceId:
|
|
7570
|
+
sourceId: gp,
|
|
7506
7571
|
revision: Zs().positive(),
|
|
7507
|
-
name:
|
|
7572
|
+
name: vp,
|
|
7508
7573
|
provider: mc(["feishu", "feishu_app_bot"]),
|
|
7509
|
-
appId:
|
|
7510
|
-
connectionId:
|
|
7511
|
-
teamId:
|
|
7574
|
+
appId: gp,
|
|
7575
|
+
connectionId: gp,
|
|
7576
|
+
teamId: gp.nullable(),
|
|
7512
7577
|
enabled: T(),
|
|
7513
|
-
eventTypes: E(
|
|
7578
|
+
eventTypes: E(_p),
|
|
7514
7579
|
manageSubscriptions: T(),
|
|
7515
7580
|
verificationTokenConfigured: T(),
|
|
7516
7581
|
encryptKeyConfigured: T(),
|
|
@@ -7519,22 +7584,22 @@ var mp = S().min(1).max(256), hp = S().regex(/^[a-z][a-z0-9_.]{0,127}$/), gp = S
|
|
|
7519
7584
|
lastReceivedAt: S().nullable(),
|
|
7520
7585
|
updatedAt: S(),
|
|
7521
7586
|
consumers: E(O({
|
|
7522
|
-
flowId:
|
|
7587
|
+
flowId: gp,
|
|
7523
7588
|
flowName: S(),
|
|
7524
|
-
triggerNodeId:
|
|
7589
|
+
triggerNodeId: gp
|
|
7525
7590
|
}))
|
|
7526
7591
|
});
|
|
7527
|
-
function
|
|
7528
|
-
return
|
|
7592
|
+
function bp(e) {
|
|
7593
|
+
return yp.parse(e);
|
|
7529
7594
|
}
|
|
7530
|
-
function
|
|
7595
|
+
function xp(e) {
|
|
7531
7596
|
return O({
|
|
7532
7597
|
version: j(1),
|
|
7533
|
-
sources: E(
|
|
7534
|
-
teamId:
|
|
7598
|
+
sources: E(yp),
|
|
7599
|
+
teamId: gp.nullable().optional()
|
|
7535
7600
|
}).parse(e);
|
|
7536
7601
|
}
|
|
7537
|
-
var
|
|
7602
|
+
var Sp = new Map([
|
|
7538
7603
|
"en",
|
|
7539
7604
|
"zh-CN",
|
|
7540
7605
|
"zh-TW",
|
|
@@ -7543,12 +7608,12 @@ var bp = new Map([
|
|
|
7543
7608
|
"ru",
|
|
7544
7609
|
"fr"
|
|
7545
7610
|
].map((e) => [e.toLowerCase(), e]));
|
|
7546
|
-
function
|
|
7547
|
-
return typeof e == "string" &&
|
|
7611
|
+
function Cp(e) {
|
|
7612
|
+
return typeof e == "string" && Sp.get(e.toLowerCase()) == e;
|
|
7548
7613
|
}
|
|
7549
7614
|
//#endregion
|
|
7550
7615
|
//#region src/trigger/common/configSchema.ts
|
|
7551
|
-
var
|
|
7616
|
+
var wp = E(k([O({
|
|
7552
7617
|
handle: S().min(1),
|
|
7553
7618
|
description: S().optional(),
|
|
7554
7619
|
jsonSchema: Vc(),
|
|
@@ -7560,7 +7625,7 @@ var Sp = E(k([O({
|
|
|
7560
7625
|
})]));
|
|
7561
7626
|
//#endregion
|
|
7562
7627
|
//#region src/control/common/triggerDecoders.ts
|
|
7563
|
-
function
|
|
7628
|
+
function Tp(e) {
|
|
7564
7629
|
let t = F(e), n = t.type;
|
|
7565
7630
|
return n != "integration" && n != "poll" ? P() : {
|
|
7566
7631
|
description: typeof t.description == "string" ? t.description : P(),
|
|
@@ -7571,9 +7636,9 @@ function Cp(e) {
|
|
|
7571
7636
|
type: n
|
|
7572
7637
|
};
|
|
7573
7638
|
}
|
|
7574
|
-
function
|
|
7575
|
-
let t = F(e), n =
|
|
7576
|
-
configInputs:
|
|
7639
|
+
function Ep(e) {
|
|
7640
|
+
let t = F(e), n = Tp(t), r = {
|
|
7641
|
+
configInputs: wp.parse(t.configInputs),
|
|
7577
7642
|
definitionVersion: t.definitionVersion === 2 ? 2 : P(),
|
|
7578
7643
|
description: n.description,
|
|
7579
7644
|
displayName: n.displayName,
|
|
@@ -7622,18 +7687,18 @@ function wp(e) {
|
|
|
7622
7687
|
type: "integration"
|
|
7623
7688
|
};
|
|
7624
7689
|
}
|
|
7625
|
-
var
|
|
7690
|
+
var Dp = /* @__PURE__ */ new Set([
|
|
7626
7691
|
"cron",
|
|
7627
7692
|
"integration",
|
|
7628
7693
|
"poll",
|
|
7629
7694
|
"webhook"
|
|
7630
|
-
]),
|
|
7695
|
+
]), Op = /* @__PURE__ */ new Set([
|
|
7631
7696
|
"failed",
|
|
7632
7697
|
"healthy",
|
|
7633
7698
|
"initializing",
|
|
7634
7699
|
"needs_reauth",
|
|
7635
7700
|
"suspended"
|
|
7636
|
-
]),
|
|
7701
|
+
]), kp = /* @__PURE__ */ new Set([
|
|
7637
7702
|
"delivery.failed",
|
|
7638
7703
|
"health.failed",
|
|
7639
7704
|
"health.needs_reauth",
|
|
@@ -7642,11 +7707,11 @@ var Tp = /* @__PURE__ */ new Set([
|
|
|
7642
7707
|
"operator.paused",
|
|
7643
7708
|
"operator.resumed"
|
|
7644
7709
|
]);
|
|
7645
|
-
function
|
|
7710
|
+
function Ap(e) {
|
|
7646
7711
|
let t = F(e), n = t.health, r = t.listener == null ? void 0 : F(t.listener);
|
|
7647
7712
|
if (r != null && r.health != "healthy" && r.health != "failed" && r.health != "needs_reauth") return P();
|
|
7648
7713
|
let i = t.kind, a = t.operatorState, o = R(t.runtimeVersion);
|
|
7649
|
-
return t.version != 1 || typeof n != "string" || !
|
|
7714
|
+
return t.version != 1 || typeof n != "string" || !Op.has(n) || typeof i != "string" || !Dp.has(i) || a != "active" && a != "paused" || o <= 0 ? P() : {
|
|
7650
7715
|
...t.currentPublicationId == null ? {} : { currentPublicationId: I(t.currentPublicationId) },
|
|
7651
7716
|
...t.currentRevisionId == null ? {} : { currentRevisionId: I(t.currentRevisionId) },
|
|
7652
7717
|
...t.endpointUrl == null ? {} : { endpointUrl: I(t.endpointUrl) },
|
|
@@ -7665,16 +7730,16 @@ function Op(e) {
|
|
|
7665
7730
|
version: 1
|
|
7666
7731
|
};
|
|
7667
7732
|
}
|
|
7668
|
-
function
|
|
7733
|
+
function jp(e) {
|
|
7669
7734
|
let t = F(e);
|
|
7670
7735
|
return t.version == 1 ? {
|
|
7671
|
-
binding:
|
|
7736
|
+
binding: Ap(t.binding),
|
|
7672
7737
|
version: 1
|
|
7673
7738
|
} : P();
|
|
7674
7739
|
}
|
|
7675
|
-
function
|
|
7740
|
+
function Mp(e) {
|
|
7676
7741
|
let t = F(e), n = t.kind;
|
|
7677
|
-
if (typeof n != "string" || !
|
|
7742
|
+
if (typeof n != "string" || !kp.has(n)) return P();
|
|
7678
7743
|
let r = zl(t.errorCode), i = zl(t.errorMessage);
|
|
7679
7744
|
return i != null && i.length > 512 ? P() : {
|
|
7680
7745
|
activityId: I(t.activityId),
|
|
@@ -7684,15 +7749,15 @@ function Ap(e) {
|
|
|
7684
7749
|
kind: n
|
|
7685
7750
|
};
|
|
7686
7751
|
}
|
|
7687
|
-
function
|
|
7752
|
+
function Np(e) {
|
|
7688
7753
|
let t = F(e), n = zl(t.nextCursor);
|
|
7689
7754
|
return t.version != 1 || !Array.isArray(t.activities) ? P() : {
|
|
7690
|
-
activities: t.activities.map(
|
|
7755
|
+
activities: t.activities.map(Mp),
|
|
7691
7756
|
...n == null ? {} : { nextCursor: n },
|
|
7692
7757
|
version: 1
|
|
7693
7758
|
};
|
|
7694
7759
|
}
|
|
7695
|
-
function
|
|
7760
|
+
function Pp(e) {
|
|
7696
7761
|
let t = F(e), n = R(t.filtered);
|
|
7697
7762
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.hasMore != "boolean" || n < 0 ? P() : {
|
|
7698
7763
|
events: t.events.map((e) => {
|
|
@@ -7706,44 +7771,53 @@ function Mp(e) {
|
|
|
7706
7771
|
}
|
|
7707
7772
|
//#endregion
|
|
7708
7773
|
//#region src/control/common/triggerCatalog.ts
|
|
7709
|
-
function
|
|
7774
|
+
function Fp(e) {
|
|
7710
7775
|
let t = F(e);
|
|
7711
7776
|
if (L(t, [
|
|
7712
7777
|
"version",
|
|
7713
7778
|
"locale",
|
|
7714
7779
|
"definitions",
|
|
7715
7780
|
"display"
|
|
7716
|
-
]), t.version !=
|
|
7717
|
-
let n = t.definitions.map(
|
|
7781
|
+
]), t.version != 3 || !Cp(t.locale) || !Array.isArray(t.definitions)) return P();
|
|
7782
|
+
let n = t.definitions.map(Ep), r = F(t.display), i = new Set(n.map((e) => e.key));
|
|
7718
7783
|
if (i.size != n.length || Object.keys(r).length != i.size) return P();
|
|
7719
7784
|
let a = Object.fromEntries(n.map((e) => {
|
|
7720
7785
|
let { key: t } = e, n = F(r[t]);
|
|
7721
7786
|
return L(n, [
|
|
7722
7787
|
"configInputs",
|
|
7788
|
+
"configInputLabels",
|
|
7723
7789
|
"displayName",
|
|
7724
7790
|
"description",
|
|
7725
7791
|
"outputs"
|
|
7726
7792
|
]), [t, {
|
|
7727
|
-
configInputs:
|
|
7793
|
+
configInputs: Ip(n.configInputs, e.configInputs.flatMap((e) => "handle" in e ? [e.handle] : [])),
|
|
7794
|
+
configInputLabels: Lp(n.configInputLabels, e.configInputs.flatMap((e) => "handle" in e ? [e.handle] : [])),
|
|
7728
7795
|
displayName: I(n.displayName),
|
|
7729
7796
|
description: I(n.description),
|
|
7730
|
-
outputs:
|
|
7797
|
+
outputs: Ip(n.outputs, e.outputs.map((e) => e.handle))
|
|
7731
7798
|
}];
|
|
7732
7799
|
}));
|
|
7733
7800
|
return {
|
|
7734
|
-
version:
|
|
7801
|
+
version: 3,
|
|
7735
7802
|
locale: t.locale,
|
|
7736
7803
|
definitions: n,
|
|
7737
7804
|
display: a
|
|
7738
7805
|
};
|
|
7739
7806
|
}
|
|
7740
|
-
function
|
|
7807
|
+
function Ip(e, t) {
|
|
7741
7808
|
let n = F(e);
|
|
7742
7809
|
return L(n, t), Object.fromEntries(Object.entries(n).map(([e, t]) => [e, I(t)]));
|
|
7743
7810
|
}
|
|
7811
|
+
function Lp(e, t) {
|
|
7812
|
+
let n = F(e);
|
|
7813
|
+
return Object.keys(n).some((e) => !t.includes(e)) ? P() : Object.fromEntries(Object.entries(n).map(([e, t]) => {
|
|
7814
|
+
let n = I(t);
|
|
7815
|
+
return n.trim().length == 0 ? P() : [e, n];
|
|
7816
|
+
}));
|
|
7817
|
+
}
|
|
7744
7818
|
//#endregion
|
|
7745
7819
|
//#region src/control/common/results.ts
|
|
7746
|
-
var
|
|
7820
|
+
var Rp = Vc(), zp = O({
|
|
7747
7821
|
pointer: S(),
|
|
7748
7822
|
type: mc([
|
|
7749
7823
|
"object",
|
|
@@ -7755,12 +7829,12 @@ var Fp = Vc(), Ip = O({
|
|
|
7755
7829
|
]),
|
|
7756
7830
|
length: w().int().nonnegative().optional(),
|
|
7757
7831
|
complete: T(),
|
|
7758
|
-
value:
|
|
7759
|
-
}),
|
|
7832
|
+
value: Rp.optional()
|
|
7833
|
+
}), Bp = zp.extend({
|
|
7760
7834
|
offset: w().int().nonnegative(),
|
|
7761
7835
|
nextOffset: w().int().positive().optional(),
|
|
7762
|
-
entries: E(
|
|
7763
|
-
}),
|
|
7836
|
+
entries: E(zp).optional()
|
|
7837
|
+
}), Vp = O({
|
|
7764
7838
|
resultId: S().min(1),
|
|
7765
7839
|
callId: S().min(1),
|
|
7766
7840
|
toolId: S().min(1),
|
|
@@ -7771,59 +7845,60 @@ var Fp = Vc(), Ip = O({
|
|
|
7771
7845
|
bytes: w().int().nonnegative(),
|
|
7772
7846
|
digest: S().regex(/^[a-f0-9]{64}$/),
|
|
7773
7847
|
createdAt: S().datetime()
|
|
7774
|
-
}),
|
|
7848
|
+
}), Hp = O({
|
|
7775
7849
|
version: j(1),
|
|
7776
7850
|
runId: S(),
|
|
7777
|
-
results: E(
|
|
7851
|
+
results: E(Vp),
|
|
7778
7852
|
nextAfter: S().optional()
|
|
7779
|
-
}),
|
|
7853
|
+
}), Up = O({
|
|
7780
7854
|
version: j(1),
|
|
7781
7855
|
runId: S(),
|
|
7782
|
-
result:
|
|
7783
|
-
page:
|
|
7856
|
+
result: Vp,
|
|
7857
|
+
page: Bp
|
|
7784
7858
|
});
|
|
7785
|
-
function
|
|
7786
|
-
return
|
|
7859
|
+
function Wp(e) {
|
|
7860
|
+
return Hp.parse(e);
|
|
7787
7861
|
}
|
|
7788
|
-
function
|
|
7789
|
-
return
|
|
7862
|
+
function Gp(e) {
|
|
7863
|
+
return Up.parse(e);
|
|
7790
7864
|
}
|
|
7791
7865
|
new TextEncoder();
|
|
7792
7866
|
//#endregion
|
|
7793
7867
|
//#region src/control/common/checkDecoders.ts
|
|
7794
|
-
function
|
|
7868
|
+
function Kp(e) {
|
|
7795
7869
|
return Array.isArray(e) ? e.map((e) => typeof e == "string" || Number.isSafeInteger(e) ? e : P()) : P();
|
|
7796
7870
|
}
|
|
7797
|
-
function
|
|
7871
|
+
function qp(e) {
|
|
7798
7872
|
let t = F(e), n = I(t.kind);
|
|
7799
7873
|
return n == "artifact" || n == "binary" || n == "nullable" ? { kind: n } : n == "schema" ? {
|
|
7800
7874
|
kind: n,
|
|
7801
|
-
path: t.path == null ? void 0 :
|
|
7875
|
+
path: t.path == null ? void 0 : Kp(t.path)
|
|
7802
7876
|
} : n != "keyword" || typeof t.keyword != "string" || !Pl(t.keyword) ? P() : {
|
|
7803
7877
|
kind: n,
|
|
7804
7878
|
keyword: t.keyword,
|
|
7805
|
-
path:
|
|
7879
|
+
path: Kp(t.path),
|
|
7806
7880
|
source: t.source === void 0 ? void 0 : Rl(t.source),
|
|
7807
7881
|
target: t.target === void 0 ? void 0 : Rl(t.target)
|
|
7808
7882
|
};
|
|
7809
7883
|
}
|
|
7810
|
-
function
|
|
7884
|
+
function Jp(e) {
|
|
7811
7885
|
let t = F(e), n = t.values == null ? void 0 : F(t.values);
|
|
7812
7886
|
return {
|
|
7813
7887
|
code: I(t.code),
|
|
7814
7888
|
column: R(t.column),
|
|
7889
|
+
...t.fields === void 0 ? {} : { fields: Array.isArray(t.fields) ? t.fields.map(I) : P() },
|
|
7815
7890
|
line: R(t.line),
|
|
7816
7891
|
message: I(t.message),
|
|
7817
|
-
mismatch: t.mismatch == null ? void 0 :
|
|
7892
|
+
mismatch: t.mismatch == null ? void 0 : qp(t.mismatch),
|
|
7818
7893
|
path: typeof t.path == "string" ? t.path : P(),
|
|
7819
7894
|
...n == null ? {} : { values: Object.fromEntries(Object.entries(n).map(([e, t]) => [e, typeof t == "string" || typeof t == "number" ? t : P()])) }
|
|
7820
7895
|
};
|
|
7821
7896
|
}
|
|
7822
|
-
function
|
|
7897
|
+
function Yp(e) {
|
|
7823
7898
|
let t = F(e);
|
|
7824
7899
|
return t.version != 1 || typeof t.valid != "boolean" || !Array.isArray(t.diagnostics) ? P() : {
|
|
7825
7900
|
closureDigest: I(t.closureDigest),
|
|
7826
|
-
diagnostics: t.diagnostics.map(
|
|
7901
|
+
diagnostics: t.diagnostics.map(Jp),
|
|
7827
7902
|
engineContract: I(t.engineContract),
|
|
7828
7903
|
flowId: I(t.flowId),
|
|
7829
7904
|
modelVersion: R(t.modelVersion),
|
|
@@ -7835,8 +7910,8 @@ function Kp(e) {
|
|
|
7835
7910
|
}
|
|
7836
7911
|
//#endregion
|
|
7837
7912
|
//#region src/control/common/connectorQueries.ts
|
|
7838
|
-
var
|
|
7839
|
-
function
|
|
7913
|
+
var Xp = (e) => e == null ? "" : `?flowId=${encodeURIComponent(e)}`;
|
|
7914
|
+
function Zp(e, t) {
|
|
7840
7915
|
let n = new URLSearchParams({
|
|
7841
7916
|
...e == null ? {} : { flowId: e },
|
|
7842
7917
|
...t == null ? {} : { locale: t }
|
|
@@ -7845,11 +7920,11 @@ function Jp(e, t) {
|
|
|
7845
7920
|
path: `/v1/connector/providers${n ? `?${n}` : ""}`,
|
|
7846
7921
|
decode: (e) => {
|
|
7847
7922
|
let t = F(e);
|
|
7848
|
-
return L(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? P() : t.providers.map(
|
|
7923
|
+
return L(t, ["providers", "version"]), t.version != 1 || !Array.isArray(t.providers) ? P() : t.providers.map(nu);
|
|
7849
7924
|
}
|
|
7850
7925
|
};
|
|
7851
7926
|
}
|
|
7852
|
-
function
|
|
7927
|
+
function Qp(e, t, n) {
|
|
7853
7928
|
let r = new URLSearchParams({
|
|
7854
7929
|
...t == null ? {} : { flowId: t },
|
|
7855
7930
|
...n == null ? {} : { locale: n }
|
|
@@ -7858,35 +7933,35 @@ function Yp(e, t, n) {
|
|
|
7858
7933
|
path: `/v1/connector/actions/${encodeURIComponent(e)}${r ? `?${r}` : ""}`,
|
|
7859
7934
|
decode: (e) => {
|
|
7860
7935
|
let t = F(e);
|
|
7861
|
-
return L(t, ["action", "version"]), t.version == 1 ?
|
|
7936
|
+
return L(t, ["action", "version"]), t.version == 1 ? tu(t.action) : P();
|
|
7862
7937
|
}
|
|
7863
7938
|
};
|
|
7864
7939
|
}
|
|
7865
|
-
function
|
|
7940
|
+
function $p(e) {
|
|
7866
7941
|
return {
|
|
7867
|
-
path: `/v1/connector/connections${
|
|
7942
|
+
path: `/v1/connector/connections${Xp(e)}`,
|
|
7868
7943
|
decode: (e) => {
|
|
7869
7944
|
let t = F(e);
|
|
7870
|
-
return L(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? P() : t.connections.map(
|
|
7945
|
+
return L(t, ["connections", "version"]), t.version != 1 || !Array.isArray(t.connections) ? P() : t.connections.map(Xl);
|
|
7871
7946
|
}
|
|
7872
7947
|
};
|
|
7873
7948
|
}
|
|
7874
|
-
function
|
|
7949
|
+
function em(e, t) {
|
|
7875
7950
|
return {
|
|
7876
|
-
path: `/v1/connector/connections/${encodeURIComponent(e)}${
|
|
7951
|
+
path: `/v1/connector/connections/${encodeURIComponent(e)}${Xp(t)}`,
|
|
7877
7952
|
decode: (t) => {
|
|
7878
7953
|
let n = F(t);
|
|
7879
7954
|
return L(n, [
|
|
7880
7955
|
"connections",
|
|
7881
7956
|
"serviceId",
|
|
7882
7957
|
"version"
|
|
7883
|
-
]), n.version != 1 || I(n.serviceId) != e || !Array.isArray(n.connections) ? P() : n.connections.map(
|
|
7958
|
+
]), n.version != 1 || I(n.serviceId) != e || !Array.isArray(n.connections) ? P() : n.connections.map(Xl);
|
|
7884
7959
|
}
|
|
7885
7960
|
};
|
|
7886
7961
|
}
|
|
7887
7962
|
//#endregion
|
|
7888
7963
|
//#region src/control/common/flowDecoders.ts
|
|
7889
|
-
function
|
|
7964
|
+
function tm(e) {
|
|
7890
7965
|
let t = F(e), n = t.status;
|
|
7891
7966
|
if (t.version != 1 || n != "active" && n != "retiring") return P();
|
|
7892
7967
|
let r = t.live == null ? void 0 : F(t.live);
|
|
@@ -7905,18 +7980,18 @@ function Qp(e) {
|
|
|
7905
7980
|
version: 1
|
|
7906
7981
|
};
|
|
7907
7982
|
}
|
|
7908
|
-
function
|
|
7983
|
+
function nm(e) {
|
|
7909
7984
|
let t = F(e);
|
|
7910
7985
|
if (t.version != 1 || !Array.isArray(t.flows)) return P();
|
|
7911
7986
|
let n = t.nextCursor, r = t.total;
|
|
7912
7987
|
return n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? P() : {
|
|
7913
7988
|
...n == null ? {} : { nextCursor: n },
|
|
7914
|
-
flows: t.flows.map(
|
|
7989
|
+
flows: t.flows.map(tm),
|
|
7915
7990
|
...r == null ? {} : { total: r },
|
|
7916
7991
|
version: 1
|
|
7917
7992
|
};
|
|
7918
7993
|
}
|
|
7919
|
-
function
|
|
7994
|
+
function rm(e) {
|
|
7920
7995
|
let t = F(e);
|
|
7921
7996
|
if (L(t, [
|
|
7922
7997
|
"name",
|
|
@@ -7939,7 +8014,7 @@ function em(e) {
|
|
|
7939
8014
|
}
|
|
7940
8015
|
//#endregion
|
|
7941
8016
|
//#region src/control/common/publicationDecoders.ts
|
|
7942
|
-
function
|
|
8017
|
+
function im(e) {
|
|
7943
8018
|
let t = F(e), n = t.operation, r = t.sourcePublicationId;
|
|
7944
8019
|
return t.version != 1 || n != "publish" && n != "rollback" || r != null && typeof r != "string" ? P() : {
|
|
7945
8020
|
actorId: I(t.actorId),
|
|
@@ -7950,14 +8025,14 @@ function tm(e) {
|
|
|
7950
8025
|
modelVersion: R(t.modelVersion),
|
|
7951
8026
|
operation: n,
|
|
7952
8027
|
publicationId: I(t.publicationId),
|
|
7953
|
-
|
|
8028
|
+
sharedAccessDigest: I(t.sharedAccessDigest),
|
|
7954
8029
|
revisionDigest: I(t.revisionDigest),
|
|
7955
8030
|
revisionId: I(t.revisionId),
|
|
7956
8031
|
...r == null ? {} : { sourcePublicationId: r },
|
|
7957
8032
|
version: 1
|
|
7958
8033
|
};
|
|
7959
8034
|
}
|
|
7960
|
-
function
|
|
8035
|
+
function am(e) {
|
|
7961
8036
|
let t = F(e), n = t.status, r = {
|
|
7962
8037
|
createdAt: I(t.createdAt),
|
|
7963
8038
|
flowId: I(t.flowId),
|
|
@@ -8023,29 +8098,29 @@ function nm(e) {
|
|
|
8023
8098
|
default: return P();
|
|
8024
8099
|
}
|
|
8025
8100
|
}
|
|
8026
|
-
function
|
|
8101
|
+
function om(e) {
|
|
8027
8102
|
let t = F(e), n = t.status, r = t.publication;
|
|
8028
8103
|
return t.version != 1 || typeof t.hasUnpublishedChanges != "boolean" || n != "not-published" && n != "runnable" && n != "suspended" || n == "not-published" && r !== null || n != "not-published" && r === null ? P() : {
|
|
8029
8104
|
flowId: I(t.flowId),
|
|
8030
8105
|
hasUnpublishedChanges: t.hasUnpublishedChanges,
|
|
8031
|
-
publication: r === null ? null :
|
|
8106
|
+
publication: r === null ? null : im(r),
|
|
8032
8107
|
revision: R(t.revision),
|
|
8033
8108
|
status: n,
|
|
8034
8109
|
version: 1
|
|
8035
8110
|
};
|
|
8036
8111
|
}
|
|
8037
|
-
function
|
|
8112
|
+
function sm(e) {
|
|
8038
8113
|
let t = F(e), n = t.nextCursor, r = t.total;
|
|
8039
8114
|
return t.version != 1 || !Array.isArray(t.publications) || n != null && typeof n != "string" || r != null && !Number.isSafeInteger(r) ? P() : {
|
|
8040
8115
|
...n == null ? {} : { nextCursor: n },
|
|
8041
|
-
publications: t.publications.map(
|
|
8116
|
+
publications: t.publications.map(im),
|
|
8042
8117
|
...r == null ? {} : { total: r },
|
|
8043
8118
|
version: 1
|
|
8044
8119
|
};
|
|
8045
8120
|
}
|
|
8046
8121
|
//#endregion
|
|
8047
8122
|
//#region src/control/common/revisionDecoders.ts
|
|
8048
|
-
function
|
|
8123
|
+
function cm(e) {
|
|
8049
8124
|
let t = F(e), n = t.parentRevisionId;
|
|
8050
8125
|
return t.version != 1 || n !== null && typeof n != "string" ? P() : {
|
|
8051
8126
|
actorId: I(t.actorId),
|
|
@@ -8058,18 +8133,18 @@ function am(e) {
|
|
|
8058
8133
|
version: 1
|
|
8059
8134
|
};
|
|
8060
8135
|
}
|
|
8061
|
-
function
|
|
8136
|
+
function lm(e) {
|
|
8062
8137
|
let t = F(e);
|
|
8063
8138
|
try {
|
|
8064
8139
|
return {
|
|
8065
|
-
...
|
|
8140
|
+
...cm(t),
|
|
8066
8141
|
content: jl(t.content)
|
|
8067
8142
|
};
|
|
8068
8143
|
} catch {
|
|
8069
8144
|
return P();
|
|
8070
8145
|
}
|
|
8071
8146
|
}
|
|
8072
|
-
function
|
|
8147
|
+
function um(e) {
|
|
8073
8148
|
let t = F(e);
|
|
8074
8149
|
return t.version != 1 || R(t.revision) < 1 ? P() : {
|
|
8075
8150
|
revision: R(t.revision),
|
|
@@ -8078,28 +8153,28 @@ function sm(e) {
|
|
|
8078
8153
|
version: 1
|
|
8079
8154
|
};
|
|
8080
8155
|
}
|
|
8081
|
-
function
|
|
8156
|
+
function dm(e) {
|
|
8082
8157
|
let t = F(e);
|
|
8083
8158
|
return t.version == 1 ? {
|
|
8084
|
-
revision:
|
|
8159
|
+
revision: cm(t.revision),
|
|
8085
8160
|
version: 1
|
|
8086
8161
|
} : P();
|
|
8087
8162
|
}
|
|
8088
|
-
function
|
|
8163
|
+
function fm(e) {
|
|
8089
8164
|
let t = F(e);
|
|
8090
8165
|
return t.version != 1 || t.kind != "snapshot" ? P() : {
|
|
8091
|
-
draft:
|
|
8166
|
+
draft: lm(t.draft),
|
|
8092
8167
|
kind: "snapshot",
|
|
8093
8168
|
version: 1
|
|
8094
8169
|
};
|
|
8095
8170
|
}
|
|
8096
8171
|
//#endregion
|
|
8097
8172
|
//#region src/control/common/runDecoders.ts
|
|
8098
|
-
var
|
|
8099
|
-
function
|
|
8100
|
-
return typeof e == "string" &&
|
|
8173
|
+
var pm = new Set(Wc);
|
|
8174
|
+
function mm(e) {
|
|
8175
|
+
return typeof e == "string" && pm.has(e) ? e : P();
|
|
8101
8176
|
}
|
|
8102
|
-
function
|
|
8177
|
+
function hm(e) {
|
|
8103
8178
|
let t = F(e), n = t.source, r = t.startedAt, i = t.finishedAt;
|
|
8104
8179
|
return t.version != 1 || n != "draft" && n != "live" && n != "trigger" || r != null && typeof r != "string" || i != null && typeof i != "string" ? P() : {
|
|
8105
8180
|
createdAt: I(t.createdAt),
|
|
@@ -8109,11 +8184,11 @@ function fm(e) {
|
|
|
8109
8184
|
runId: I(t.runId),
|
|
8110
8185
|
source: n,
|
|
8111
8186
|
...r == null ? {} : { startedAt: r },
|
|
8112
|
-
status:
|
|
8187
|
+
status: mm(t.status),
|
|
8113
8188
|
version: 1
|
|
8114
8189
|
};
|
|
8115
8190
|
}
|
|
8116
|
-
function
|
|
8191
|
+
function gm(e) {
|
|
8117
8192
|
let t = F(e);
|
|
8118
8193
|
L(t, [
|
|
8119
8194
|
"actions",
|
|
@@ -8133,10 +8208,10 @@ function pm(e) {
|
|
|
8133
8208
|
waitingSince: I(t.waitingSince)
|
|
8134
8209
|
};
|
|
8135
8210
|
}
|
|
8136
|
-
function
|
|
8137
|
-
let t = F(e), n =
|
|
8211
|
+
function _m(e) {
|
|
8212
|
+
let t = F(e), n = hm(t), r = t.eventsExpiresAt;
|
|
8138
8213
|
if (r != null && typeof r != "string" || t.waiting !== void 0 || !Array.isArray(t.waits)) return P();
|
|
8139
|
-
let i = t.waits.map(
|
|
8214
|
+
let i = t.waits.map(gm);
|
|
8140
8215
|
if (new Set(i.map((e) => e.waitId)).size != i.length || n.status == "waiting" && i.length == 0 || [
|
|
8141
8216
|
"completed",
|
|
8142
8217
|
"failed",
|
|
@@ -8153,7 +8228,7 @@ function mm(e) {
|
|
|
8153
8228
|
engineDigest: I(t.engineDigest),
|
|
8154
8229
|
...r == null ? {} : { eventsExpiresAt: r },
|
|
8155
8230
|
modelVersion: R(t.modelVersion),
|
|
8156
|
-
|
|
8231
|
+
sharedAccessDigest: I(t.sharedAccessDigest),
|
|
8157
8232
|
revisionDigest: I(t.revisionDigest),
|
|
8158
8233
|
...a
|
|
8159
8234
|
};
|
|
@@ -8176,17 +8251,17 @@ function mm(e) {
|
|
|
8176
8251
|
};
|
|
8177
8252
|
}
|
|
8178
8253
|
}
|
|
8179
|
-
function
|
|
8254
|
+
function vm(e) {
|
|
8180
8255
|
let t = F(e), n = t.nextCursor;
|
|
8181
8256
|
return t.version != 1 || !Array.isArray(t.runs) || n != null && typeof n != "string" ? P() : {
|
|
8182
8257
|
flowId: I(t.flowId),
|
|
8183
8258
|
...n == null ? {} : { nextCursor: n },
|
|
8184
|
-
runs: t.runs.map(
|
|
8259
|
+
runs: t.runs.map(hm),
|
|
8185
8260
|
version: 1
|
|
8186
8261
|
};
|
|
8187
8262
|
}
|
|
8188
|
-
function
|
|
8189
|
-
let t = F(e), n =
|
|
8263
|
+
function ym(e) {
|
|
8264
|
+
let t = F(e), n = mm(t.status);
|
|
8190
8265
|
return t.version != 1 || typeof t.cancelAccepted != "boolean" || n == "queued" || n == "starting" || n == "running" || n == "waiting" ? P() : {
|
|
8191
8266
|
cancelAccepted: t.cancelAccepted,
|
|
8192
8267
|
runId: I(t.runId),
|
|
@@ -8194,7 +8269,7 @@ function gm(e) {
|
|
|
8194
8269
|
version: 1
|
|
8195
8270
|
};
|
|
8196
8271
|
}
|
|
8197
|
-
function
|
|
8272
|
+
function bm(e) {
|
|
8198
8273
|
let t = F(e);
|
|
8199
8274
|
L(t, [
|
|
8200
8275
|
"action",
|
|
@@ -8213,12 +8288,12 @@ function _m(e) {
|
|
|
8213
8288
|
resolutionAccepted: t.resolutionAccepted,
|
|
8214
8289
|
resolvedAt: r,
|
|
8215
8290
|
runId: I(t.runId),
|
|
8216
|
-
status:
|
|
8291
|
+
status: mm(t.status),
|
|
8217
8292
|
version: 1,
|
|
8218
8293
|
waitId: I(t.waitId)
|
|
8219
8294
|
};
|
|
8220
8295
|
}
|
|
8221
|
-
function
|
|
8296
|
+
function xm(e) {
|
|
8222
8297
|
let t = F(e), n = t.status;
|
|
8223
8298
|
if (t.version != 1) return P();
|
|
8224
8299
|
let r = {
|
|
@@ -8261,7 +8336,7 @@ function vm(e) {
|
|
|
8261
8336
|
}
|
|
8262
8337
|
//#endregion
|
|
8263
8338
|
//#region src/control/common/random.ts
|
|
8264
|
-
function
|
|
8339
|
+
function Sm() {
|
|
8265
8340
|
let e = globalThis.crypto;
|
|
8266
8341
|
if (e != null) {
|
|
8267
8342
|
try {
|
|
@@ -8278,7 +8353,7 @@ function ym() {
|
|
|
8278
8353
|
}
|
|
8279
8354
|
//#endregion
|
|
8280
8355
|
//#region src/control/common/api.ts
|
|
8281
|
-
function
|
|
8356
|
+
function Cm(e) {
|
|
8282
8357
|
let t = F(e), n = R(t.sequence);
|
|
8283
8358
|
if (n < 0) return P();
|
|
8284
8359
|
let r = {
|
|
@@ -8306,7 +8381,7 @@ function bm(e) {
|
|
|
8306
8381
|
payload: {
|
|
8307
8382
|
flowId: I(i.flowId),
|
|
8308
8383
|
scopeId: I(i.scopeId),
|
|
8309
|
-
progress:
|
|
8384
|
+
progress: wm(i.progress)
|
|
8310
8385
|
}
|
|
8311
8386
|
};
|
|
8312
8387
|
case "run.waiting": return Array.isArray(i.waitIds) ? {
|
|
@@ -8415,7 +8490,7 @@ function bm(e) {
|
|
|
8415
8490
|
kind: a,
|
|
8416
8491
|
payload: {
|
|
8417
8492
|
...e,
|
|
8418
|
-
progress:
|
|
8493
|
+
progress: wm(i.progress)
|
|
8419
8494
|
}
|
|
8420
8495
|
};
|
|
8421
8496
|
case "node.artifact": {
|
|
@@ -8441,14 +8516,14 @@ function bm(e) {
|
|
|
8441
8516
|
default: return P();
|
|
8442
8517
|
}
|
|
8443
8518
|
}
|
|
8444
|
-
function
|
|
8519
|
+
function wm(e) {
|
|
8445
8520
|
return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 100 ? e : P();
|
|
8446
8521
|
}
|
|
8447
|
-
function
|
|
8522
|
+
function Tm(e) {
|
|
8448
8523
|
let t = F(e), n = t.eventsExpiresAt, r = R(t.nextAfter);
|
|
8449
8524
|
return t.version != 1 || !Array.isArray(t.events) || typeof t.done != "boolean" || typeof t.historyComplete != "boolean" || n != null && typeof n != "string" || r < 0 ? P() : {
|
|
8450
8525
|
done: t.done,
|
|
8451
|
-
events: t.events.map(
|
|
8526
|
+
events: t.events.map(Cm),
|
|
8452
8527
|
...n == null ? {} : { eventsExpiresAt: n },
|
|
8453
8528
|
historyComplete: t.historyComplete,
|
|
8454
8529
|
nextAfter: r,
|
|
@@ -8457,10 +8532,10 @@ function Sm(e) {
|
|
|
8457
8532
|
};
|
|
8458
8533
|
}
|
|
8459
8534
|
var X = encodeURIComponent;
|
|
8460
|
-
function
|
|
8461
|
-
return `${e}-${
|
|
8535
|
+
function Em(e) {
|
|
8536
|
+
return `${e}-${Sm()}`;
|
|
8462
8537
|
}
|
|
8463
|
-
var
|
|
8538
|
+
var Dm = class {
|
|
8464
8539
|
constructor(e) {
|
|
8465
8540
|
this.requestControl = e;
|
|
8466
8541
|
}
|
|
@@ -8468,23 +8543,23 @@ var wm = class {
|
|
|
8468
8543
|
let t = new URLSearchParams();
|
|
8469
8544
|
e.cursor != null && t.set("cursor", e.cursor), e.limit != null && t.set("limit", String(e.limit)), e.includeTotal != null && t.set("includeTotal", String(e.includeTotal));
|
|
8470
8545
|
let n = t.size == 0 ? "" : `?${t}`;
|
|
8471
|
-
return
|
|
8546
|
+
return nm(await this.request(`/v1/flows${n}`));
|
|
8472
8547
|
}
|
|
8473
8548
|
async listEventSources(e, t) {
|
|
8474
|
-
return
|
|
8549
|
+
return xp(await this.request("/v1/event-sources" + (e == null ? "" : `?flowId=${X(e)}`), { signal: t }));
|
|
8475
8550
|
}
|
|
8476
8551
|
async listEventSourceConnections(e, t) {
|
|
8477
8552
|
let n = F(await this.request(`/v1/event-sources/connections${e == null ? "" : `?teamId=${X(e)}`}`, { signal: t }));
|
|
8478
|
-
return L(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? P() : n.connections.map(
|
|
8553
|
+
return L(n, ["version", "connections"]), n.version != 1 || !Array.isArray(n.connections) ? P() : n.connections.map(Xl);
|
|
8479
8554
|
}
|
|
8480
8555
|
async createEventSource(e) {
|
|
8481
|
-
return
|
|
8556
|
+
return bp(await this.request("/v1/event-sources", {
|
|
8482
8557
|
method: "POST",
|
|
8483
8558
|
body: JSON.stringify(e)
|
|
8484
8559
|
}));
|
|
8485
8560
|
}
|
|
8486
8561
|
async updateEventSource(e, t) {
|
|
8487
|
-
return
|
|
8562
|
+
return bp(await this.request(`/v1/event-sources/${X(e)}`, {
|
|
8488
8563
|
method: "PUT",
|
|
8489
8564
|
body: JSON.stringify(t)
|
|
8490
8565
|
}));
|
|
@@ -8501,15 +8576,15 @@ var wm = class {
|
|
|
8501
8576
|
async listVariables() {
|
|
8502
8577
|
let e = F(await this.request("/v1/variables"));
|
|
8503
8578
|
return L(e, ["variables", "version"]), e.version != 1 || !Array.isArray(e.variables) ? P() : {
|
|
8504
|
-
variables: e.variables.map(
|
|
8579
|
+
variables: e.variables.map(rm),
|
|
8505
8580
|
version: 1
|
|
8506
8581
|
};
|
|
8507
8582
|
}
|
|
8508
8583
|
async getVariable(e) {
|
|
8509
|
-
return
|
|
8584
|
+
return rm(await this.request(`/v1/variables/${X(e)}`));
|
|
8510
8585
|
}
|
|
8511
8586
|
async putVariable(e, t) {
|
|
8512
|
-
return
|
|
8587
|
+
return rm(await this.request(`/v1/variables/${X(e)}`, {
|
|
8513
8588
|
body: JSON.stringify({ value: t }),
|
|
8514
8589
|
method: "PUT"
|
|
8515
8590
|
}));
|
|
@@ -8518,8 +8593,8 @@ var wm = class {
|
|
|
8518
8593
|
let t = F(await this.request(`/v1/variables/${X(e)}`, { method: "DELETE" }));
|
|
8519
8594
|
if (L(t, ["version"]), t.version != 1) return P();
|
|
8520
8595
|
}
|
|
8521
|
-
async createFlow(e, t = `flow-${
|
|
8522
|
-
return
|
|
8596
|
+
async createFlow(e, t = `flow-${Sm()}`, n) {
|
|
8597
|
+
return tm(await this.request("/v1/flows", {
|
|
8523
8598
|
body: JSON.stringify({
|
|
8524
8599
|
name: e,
|
|
8525
8600
|
...n == null ? {} : { teamId: n },
|
|
@@ -8530,10 +8605,10 @@ var wm = class {
|
|
|
8530
8605
|
}));
|
|
8531
8606
|
}
|
|
8532
8607
|
async getFlow(e) {
|
|
8533
|
-
return
|
|
8608
|
+
return tm(await this.request(`/v1/flows/${X(e)}`));
|
|
8534
8609
|
}
|
|
8535
8610
|
async renameFlow(e, t) {
|
|
8536
|
-
return
|
|
8611
|
+
return tm(await this.request(`/v1/flows/${X(e)}`, {
|
|
8537
8612
|
body: JSON.stringify({
|
|
8538
8613
|
name: t,
|
|
8539
8614
|
version: 1
|
|
@@ -8542,15 +8617,15 @@ var wm = class {
|
|
|
8542
8617
|
}));
|
|
8543
8618
|
}
|
|
8544
8619
|
async deleteFlow(e) {
|
|
8545
|
-
return
|
|
8620
|
+
return tm(await this.request(`/v1/flows/${X(e)}`, { method: "DELETE" }));
|
|
8546
8621
|
}
|
|
8547
8622
|
async listTriggerKeys(e, t) {
|
|
8548
8623
|
let n = F(await this.request(`/v1/trigger-keys${t == null ? "" : `?locale=${encodeURIComponent(t)}`}`, { signal: e }));
|
|
8549
|
-
return n.version != 1 || !Array.isArray(n.keys) ? P() : n.keys.map(
|
|
8624
|
+
return n.version != 1 || !Array.isArray(n.keys) ? P() : n.keys.map(Tp);
|
|
8550
8625
|
}
|
|
8551
8626
|
async listTriggerDefinitions(e) {
|
|
8552
8627
|
let t = F(await this.request("/v1/trigger-keys/catalog", { signal: e }));
|
|
8553
|
-
return t.version != 2 || !Array.isArray(t.definitions) ? P() : t.definitions.map(
|
|
8628
|
+
return t.version != 2 || !Array.isArray(t.definitions) ? P() : t.definitions.map(Ep);
|
|
8554
8629
|
}
|
|
8555
8630
|
async readCatalog(e, t, n) {
|
|
8556
8631
|
let r = new Headers();
|
|
@@ -8579,41 +8654,41 @@ var wm = class {
|
|
|
8579
8654
|
...t,
|
|
8580
8655
|
etag: i.headers.get("etag")?.trim() || t.etag
|
|
8581
8656
|
} : {
|
|
8582
|
-
data:
|
|
8657
|
+
data: Fp(await i.json()),
|
|
8583
8658
|
etag: i.headers.get("etag")?.trim() || null
|
|
8584
8659
|
};
|
|
8585
8660
|
}
|
|
8586
8661
|
async getTriggerKey(e, t) {
|
|
8587
8662
|
let n = F(await this.request(`/v1/trigger-keys/${X(e)}`, { signal: t }));
|
|
8588
|
-
return n.version == 1 ?
|
|
8663
|
+
return n.version == 1 ? Ep(n.definition) : P();
|
|
8589
8664
|
}
|
|
8590
8665
|
async listFlowTriggerBindings(e, t) {
|
|
8591
8666
|
let n = F(await this.request(`/v1/flows/${X(e)}/triggers`, { signal: t }));
|
|
8592
|
-
return n.version != 1 || I(n.flowId) != e || !Array.isArray(n.bindings) ? P() : n.bindings.map(
|
|
8667
|
+
return n.version != 1 || I(n.flowId) != e || !Array.isArray(n.bindings) ? P() : n.bindings.map(Ap);
|
|
8593
8668
|
}
|
|
8594
8669
|
async getFlowTriggerBinding(e, t) {
|
|
8595
|
-
return
|
|
8670
|
+
return jp(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}`));
|
|
8596
8671
|
}
|
|
8597
8672
|
async listFlowTriggerActivities(e, t, n = {}) {
|
|
8598
8673
|
let r = new URLSearchParams();
|
|
8599
8674
|
n.cursor != null && r.set("cursor", n.cursor), n.limit != null && r.set("limit", String(n.limit));
|
|
8600
8675
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
8601
|
-
return
|
|
8676
|
+
return Np(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/activities${i}`));
|
|
8602
8677
|
}
|
|
8603
8678
|
async pauseFlowTrigger(e, t) {
|
|
8604
|
-
return
|
|
8679
|
+
return Ap(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/pause`, {
|
|
8605
8680
|
body: JSON.stringify({ version: 1 }),
|
|
8606
8681
|
method: "POST"
|
|
8607
8682
|
}));
|
|
8608
8683
|
}
|
|
8609
8684
|
async resumeFlowTrigger(e, t) {
|
|
8610
|
-
return
|
|
8685
|
+
return Ap(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/resume`, {
|
|
8611
8686
|
body: JSON.stringify({ version: 1 }),
|
|
8612
8687
|
method: "POST"
|
|
8613
8688
|
}));
|
|
8614
8689
|
}
|
|
8615
8690
|
async testFlowPollTrigger(e, t) {
|
|
8616
|
-
return
|
|
8691
|
+
return Pp(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/test`, {
|
|
8617
8692
|
body: JSON.stringify({ version: 1 }),
|
|
8618
8693
|
method: "POST"
|
|
8619
8694
|
}));
|
|
@@ -8622,25 +8697,25 @@ var wm = class {
|
|
|
8622
8697
|
let t = F(await this.request(`/v1/flows/${X(e)}/editor`));
|
|
8623
8698
|
if (t.version != 1) return P();
|
|
8624
8699
|
let n = {
|
|
8625
|
-
flow:
|
|
8626
|
-
draft:
|
|
8627
|
-
live:
|
|
8628
|
-
presentation:
|
|
8700
|
+
flow: tm(t.flow),
|
|
8701
|
+
draft: lm(t.draft),
|
|
8702
|
+
live: om(t.live),
|
|
8703
|
+
presentation: um(t.presentation),
|
|
8629
8704
|
version: 1
|
|
8630
8705
|
};
|
|
8631
8706
|
return n.flow.flowId != e || n.draft.flowId != e || n.live.flowId != e || n.flow.draftRevisionId != n.draft.revisionId ? P() : n;
|
|
8632
8707
|
}
|
|
8633
8708
|
async getPresentation(e) {
|
|
8634
|
-
return
|
|
8709
|
+
return um(await this.request(`/v1/flows/${X(e)}/presentation`));
|
|
8635
8710
|
}
|
|
8636
8711
|
async getDraft(e) {
|
|
8637
|
-
return
|
|
8712
|
+
return lm(await this.request(`/v1/flows/${X(e)}/draft`));
|
|
8638
8713
|
}
|
|
8639
8714
|
async syncDraft(e) {
|
|
8640
|
-
return
|
|
8715
|
+
return fm(await this.request(`/v1/flows/${X(e)}/draft/sync`));
|
|
8641
8716
|
}
|
|
8642
8717
|
async getRevision(e, t, n) {
|
|
8643
|
-
return
|
|
8718
|
+
return lm(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}`, { signal: n }));
|
|
8644
8719
|
}
|
|
8645
8720
|
async listTriggerConfigOptions(e, t, n, r) {
|
|
8646
8721
|
let i = F(await this.request(`/v1/flows/${X(e)}/triggers/${X(t)}/options/${X(n)}`, { signal: r }));
|
|
@@ -8686,11 +8761,11 @@ var wm = class {
|
|
|
8686
8761
|
};
|
|
8687
8762
|
}
|
|
8688
8763
|
async listConnectorProviders(e, t, n) {
|
|
8689
|
-
let r =
|
|
8764
|
+
let r = Zp(t, n);
|
|
8690
8765
|
return this.connectorRequest(r.path, "providers", e, r.decode);
|
|
8691
8766
|
}
|
|
8692
8767
|
async removeConnectionUsage(e, t, n, r, i) {
|
|
8693
|
-
return
|
|
8768
|
+
return dm(await this.request(`/v1/flows/${X(e)}/connection-usage/remove`, {
|
|
8694
8769
|
method: "POST",
|
|
8695
8770
|
headers: { "idempotency-key": i },
|
|
8696
8771
|
body: JSON.stringify({
|
|
@@ -8701,11 +8776,14 @@ var wm = class {
|
|
|
8701
8776
|
})
|
|
8702
8777
|
}));
|
|
8703
8778
|
}
|
|
8704
|
-
async getConnectorAccess(e, t
|
|
8705
|
-
return Gl(await this.request(`/v1/flows/${X(e)}/connector-access
|
|
8779
|
+
async getConnectorAccess(e, t) {
|
|
8780
|
+
return Gl(await this.request(`/v1/flows/${X(e)}/connector-access`, { signal: t }));
|
|
8781
|
+
}
|
|
8782
|
+
async getPublishedConnectorAccess(e, t, n) {
|
|
8783
|
+
return ql(await this.request(`/v1/flows/${X(e)}/connector-access?publicationId=${X(t)}`, { signal: n }));
|
|
8706
8784
|
}
|
|
8707
8785
|
async listProviderAccessBindingCandidates(e, t, n) {
|
|
8708
|
-
return
|
|
8786
|
+
return Yl(await this.request(`/v1/flows/${X(e)}/connector-access/candidates/query`, {
|
|
8709
8787
|
method: "POST",
|
|
8710
8788
|
body: JSON.stringify({
|
|
8711
8789
|
providerIds: t,
|
|
@@ -8758,15 +8836,15 @@ var wm = class {
|
|
|
8758
8836
|
}, t);
|
|
8759
8837
|
}
|
|
8760
8838
|
async getConnectorAction(e, t, n, r, i = !1) {
|
|
8761
|
-
let a =
|
|
8839
|
+
let a = Qp(e, n, r);
|
|
8762
8840
|
return this.connectorRequest(a.path, "actions", t, a.decode, i);
|
|
8763
8841
|
}
|
|
8764
8842
|
async listAllConnectorConnections(e, t, n = !1) {
|
|
8765
|
-
let r =
|
|
8843
|
+
let r = $p(t);
|
|
8766
8844
|
return this.connectorRequest(r.path, "connections", e, r.decode, n);
|
|
8767
8845
|
}
|
|
8768
8846
|
async listConnectorConnections(e, t, n, r = !1) {
|
|
8769
|
-
let i =
|
|
8847
|
+
let i = em(e, n);
|
|
8770
8848
|
return this.connectorRequest(i.path, "connections", t, i.decode, r);
|
|
8771
8849
|
}
|
|
8772
8850
|
async createConnectorConnectionPage(e, t, n) {
|
|
@@ -8784,8 +8862,8 @@ var wm = class {
|
|
|
8784
8862
|
return P();
|
|
8785
8863
|
}
|
|
8786
8864
|
}
|
|
8787
|
-
async changeDraft(e, t, n, r =
|
|
8788
|
-
return
|
|
8865
|
+
async changeDraft(e, t, n, r = Em("change")) {
|
|
8866
|
+
return dm(await this.request(`/v1/flows/${X(e)}/draft/changes`, {
|
|
8789
8867
|
body: JSON.stringify({
|
|
8790
8868
|
expectedRevisionId: t,
|
|
8791
8869
|
operations: n,
|
|
@@ -8795,8 +8873,8 @@ var wm = class {
|
|
|
8795
8873
|
method: "POST"
|
|
8796
8874
|
}));
|
|
8797
8875
|
}
|
|
8798
|
-
async repairDraft(e, t, n =
|
|
8799
|
-
return
|
|
8876
|
+
async repairDraft(e, t, n = Em("repair")) {
|
|
8877
|
+
return dm(await this.request(`/v1/flows/${X(e)}/draft/repair`, {
|
|
8800
8878
|
body: JSON.stringify({
|
|
8801
8879
|
expectedRevisionId: t,
|
|
8802
8880
|
version: 1
|
|
@@ -8806,7 +8884,7 @@ var wm = class {
|
|
|
8806
8884
|
}));
|
|
8807
8885
|
}
|
|
8808
8886
|
async checkFlow(e, t) {
|
|
8809
|
-
return
|
|
8887
|
+
return Yp(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}/check`, {
|
|
8810
8888
|
body: JSON.stringify({
|
|
8811
8889
|
engineContract: "open-flow-engine/v5",
|
|
8812
8890
|
version: 1
|
|
@@ -8815,42 +8893,42 @@ var wm = class {
|
|
|
8815
8893
|
}));
|
|
8816
8894
|
}
|
|
8817
8895
|
async getLive(e, t) {
|
|
8818
|
-
return
|
|
8896
|
+
return om(await this.request(`/v1/flows/${X(e)}/live`, { signal: t }));
|
|
8819
8897
|
}
|
|
8820
8898
|
async listPublications(e, t = {}, n) {
|
|
8821
8899
|
let r = new URLSearchParams();
|
|
8822
8900
|
t.cursor != null && r.set("cursor", t.cursor), t.limit != null && r.set("limit", String(t.limit)), t.includeTotal != null && r.set("includeTotal", String(t.includeTotal));
|
|
8823
8901
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
8824
|
-
return
|
|
8902
|
+
return sm(await this.request(`/v1/flows/${X(e)}/publications${i}`, { signal: n }));
|
|
8825
8903
|
}
|
|
8826
8904
|
async createDraftRun(e, t, n) {
|
|
8827
|
-
let r =
|
|
8905
|
+
let r = _m(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}/runs`, {
|
|
8828
8906
|
body: JSON.stringify({
|
|
8829
8907
|
engineContract: "open-flow-engine/v5",
|
|
8830
8908
|
inputs: n.inputs ?? {},
|
|
8831
8909
|
trigger: n.trigger,
|
|
8832
8910
|
version: 2
|
|
8833
8911
|
}),
|
|
8834
|
-
headers: { "idempotency-key": n.idempotencyKey ??
|
|
8912
|
+
headers: { "idempotency-key": n.idempotencyKey ?? Em("run") },
|
|
8835
8913
|
method: "POST"
|
|
8836
8914
|
}));
|
|
8837
8915
|
return r.source == "draft" ? r : P();
|
|
8838
8916
|
}
|
|
8839
8917
|
async createLiveRun(e, t) {
|
|
8840
|
-
let n =
|
|
8918
|
+
let n = _m(await this.request("/v1/runs", {
|
|
8841
8919
|
body: JSON.stringify({
|
|
8842
8920
|
inputs: t.inputs ?? {},
|
|
8843
8921
|
trigger: t.trigger,
|
|
8844
8922
|
publicationId: e,
|
|
8845
8923
|
version: 2
|
|
8846
8924
|
}),
|
|
8847
|
-
headers: { "idempotency-key": t.idempotencyKey ??
|
|
8925
|
+
headers: { "idempotency-key": t.idempotencyKey ?? Em("run") },
|
|
8848
8926
|
method: "POST"
|
|
8849
8927
|
}));
|
|
8850
8928
|
return n.source == "live" ? n : P();
|
|
8851
8929
|
}
|
|
8852
8930
|
async setFlowEnabled(e, t, n) {
|
|
8853
|
-
return
|
|
8931
|
+
return tm(await this.request(`/v1/flows/${X(e)}/enabled`, {
|
|
8854
8932
|
method: "PUT",
|
|
8855
8933
|
body: JSON.stringify({
|
|
8856
8934
|
enabled: n,
|
|
@@ -8860,65 +8938,65 @@ var wm = class {
|
|
|
8860
8938
|
}));
|
|
8861
8939
|
}
|
|
8862
8940
|
async publishFlow(e, t, n, r = {}) {
|
|
8863
|
-
return
|
|
8941
|
+
return am(await this.request(`/v1/flows/${X(e)}/revisions/${X(t)}/publications`, {
|
|
8864
8942
|
body: JSON.stringify({
|
|
8865
8943
|
engineContract: "open-flow-engine/v5",
|
|
8866
8944
|
expectedLivePublicationId: n,
|
|
8867
8945
|
version: 1
|
|
8868
8946
|
}),
|
|
8869
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
8947
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Em("publication") },
|
|
8870
8948
|
method: "POST"
|
|
8871
8949
|
}));
|
|
8872
8950
|
}
|
|
8873
8951
|
async getPublishOperation(e, t, n) {
|
|
8874
|
-
return
|
|
8952
|
+
return am(await this.request(`/v1/flows/${X(e)}/publish-operations/${X(t)}`, { signal: n }));
|
|
8875
8953
|
}
|
|
8876
8954
|
async rollbackFlow(e, t, n, r = {}) {
|
|
8877
|
-
return
|
|
8955
|
+
return im(await this.request(`/v1/flows/${X(e)}/publications/${X(t)}/rollback`, {
|
|
8878
8956
|
body: JSON.stringify({
|
|
8879
8957
|
expectedLivePublicationId: n,
|
|
8880
8958
|
version: 1
|
|
8881
8959
|
}),
|
|
8882
|
-
headers: { "idempotency-key": r.idempotencyKey ??
|
|
8960
|
+
headers: { "idempotency-key": r.idempotencyKey ?? Em("publication") },
|
|
8883
8961
|
method: "POST"
|
|
8884
8962
|
}));
|
|
8885
8963
|
}
|
|
8886
8964
|
async getRun(e, t) {
|
|
8887
|
-
return
|
|
8965
|
+
return _m(await this.request(`/v1/runs/${X(e)}`, { signal: t }));
|
|
8888
8966
|
}
|
|
8889
8967
|
async listRuns(e, t = {}) {
|
|
8890
8968
|
let n = new URLSearchParams();
|
|
8891
8969
|
t.cursor != null && n.set("cursor", t.cursor), t.limit != null && n.set("limit", String(t.limit)), t.status != null && n.set("status", t.status), t.pendingWait != null && n.set("pendingWait", String(t.pendingWait)), t.source != null && n.set("source", t.source), t.createdFrom != null && n.set("createdFrom", t.createdFrom), t.createdBefore != null && n.set("createdBefore", t.createdBefore), t.runId != null && n.set("runId", t.runId);
|
|
8892
8970
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
8893
|
-
return
|
|
8971
|
+
return vm(await this.request(`/v1/flows/${X(e)}/runs${r}`));
|
|
8894
8972
|
}
|
|
8895
8973
|
async getRunEvents(e, t = {}, n) {
|
|
8896
8974
|
let r = new URLSearchParams();
|
|
8897
8975
|
t.after != null && r.set("after", String(t.after)), t.limit != null && r.set("limit", String(t.limit));
|
|
8898
8976
|
let i = r.size == 0 ? "" : `?${r}`;
|
|
8899
|
-
return
|
|
8977
|
+
return Tm(await this.request(`/v1/runs/${X(e)}/events${i}`, { signal: n }));
|
|
8900
8978
|
}
|
|
8901
8979
|
async listRunResults(e, t, n) {
|
|
8902
|
-
return
|
|
8980
|
+
return Wp(await this.request(`/v1/runs/${X(e)}/results${t == null ? "" : `?after=${encodeURIComponent(t)}`}`, { signal: n }));
|
|
8903
8981
|
}
|
|
8904
8982
|
async readRunResult(e, t, n = {}, r) {
|
|
8905
8983
|
let i = new URLSearchParams(Object.entries(n).map(([e, t]) => [e, String(t)]));
|
|
8906
|
-
return
|
|
8984
|
+
return Gp(await this.request(`/v1/runs/${X(e)}/results/${X(t)}?${i}`, { signal: r }));
|
|
8907
8985
|
}
|
|
8908
8986
|
async downloadRunResult(e, t, n) {
|
|
8909
8987
|
return (await this.response(`/v1/runs/${X(e)}/results/${X(t)}/content`, { signal: n })).blob();
|
|
8910
8988
|
}
|
|
8911
8989
|
async getRunResult(e, t) {
|
|
8912
|
-
return
|
|
8990
|
+
return xm(await this.request(`/v1/runs/${X(e)}/result`, { signal: t }));
|
|
8913
8991
|
}
|
|
8914
8992
|
async cancelRun(e) {
|
|
8915
|
-
return
|
|
8993
|
+
return ym(await this.request(`/v1/runs/${X(e)}/cancel`, {
|
|
8916
8994
|
body: JSON.stringify({ version: 1 }),
|
|
8917
8995
|
method: "POST"
|
|
8918
8996
|
}));
|
|
8919
8997
|
}
|
|
8920
8998
|
async resolveRunWait(e, t, n, r) {
|
|
8921
|
-
return
|
|
8999
|
+
return bm(await this.request(`/v1/runs/${X(e)}/waits/${X(t)}/resolve`, {
|
|
8922
9000
|
body: JSON.stringify({
|
|
8923
9001
|
action: n,
|
|
8924
9002
|
comment: r,
|
|
@@ -8931,7 +9009,7 @@ var wm = class {
|
|
|
8931
9009
|
let n = Object.entries(e).map(([e, t]) => `${X(e)}=${X(t)}`).join("&"), r = n == "" ? "" : `?${n}`;
|
|
8932
9010
|
return this.connectorRequest(`/v1/connector/actions${r}`, "actions", t, (e) => {
|
|
8933
9011
|
let t = F(e);
|
|
8934
|
-
return L(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? P() : t.actions.map(
|
|
9012
|
+
return L(t, ["actions", "version"]), t.version != 1 || !Array.isArray(t.actions) ? P() : t.actions.map(tu);
|
|
8935
9013
|
});
|
|
8936
9014
|
}
|
|
8937
9015
|
async connectorRequest(e, t, n, r, i = !1) {
|
|
@@ -8970,13 +9048,13 @@ var wm = class {
|
|
|
8970
9048
|
function Z(e, t) {
|
|
8971
9049
|
if (!e) throw Error(t);
|
|
8972
9050
|
}
|
|
8973
|
-
async function
|
|
9051
|
+
async function Om(e, t, n) {
|
|
8974
9052
|
let r = await e.request(new Request(new URL("/v1/mcp", e.origin), {
|
|
8975
9053
|
method: "POST",
|
|
8976
9054
|
headers: {
|
|
8977
9055
|
"content-type": "application/json",
|
|
8978
9056
|
accept: "application/json, text/event-stream",
|
|
8979
|
-
"mcp-protocol-version":
|
|
9057
|
+
"mcp-protocol-version": Am,
|
|
8980
9058
|
"mcp-method": t,
|
|
8981
9059
|
...t == "tools/call" ? { "mcp-name": String(n?.name) } : {}
|
|
8982
9060
|
},
|
|
@@ -8987,7 +9065,7 @@ async function Tm(e, t, n) {
|
|
|
8987
9065
|
params: {
|
|
8988
9066
|
...n,
|
|
8989
9067
|
_meta: {
|
|
8990
|
-
"io.modelcontextprotocol/protocolVersion":
|
|
9068
|
+
"io.modelcontextprotocol/protocolVersion": Am,
|
|
8991
9069
|
"io.modelcontextprotocol/clientCapabilities": {}
|
|
8992
9070
|
}
|
|
8993
9071
|
}
|
|
@@ -8997,13 +9075,13 @@ async function Tm(e, t, n) {
|
|
|
8997
9075
|
let i = await r.text(), a = r.headers.get("content-type")?.includes("text/event-stream") ? JSON.parse(i.split("\n").findLast((e) => e.startsWith("data:"))?.slice(5) ?? "null") : JSON.parse(i);
|
|
8998
9076
|
return Z(a != null && a.error == null, `MCP ${t} failed: ${JSON.stringify(a)}.`), a.result;
|
|
8999
9077
|
}
|
|
9000
|
-
var
|
|
9078
|
+
var km = [
|
|
9001
9079
|
{
|
|
9002
9080
|
name: "publishes the public MCP catalog, input schemas and annotations",
|
|
9003
9081
|
async verify(e) {
|
|
9004
|
-
let t = await
|
|
9005
|
-
Z(Array.isArray(t.tools), "MCP tools must be an array."), Z(t.tools.length == Object.keys(
|
|
9006
|
-
for (let [e, n] of Object.entries(
|
|
9082
|
+
let t = await Om(e, "tools/list");
|
|
9083
|
+
Z(Array.isArray(t.tools), "MCP tools must be an array."), Z(t.tools.length == Object.keys(Lm).length, "MCP tool count differs from the public contract.");
|
|
9084
|
+
for (let [e, n] of Object.entries(Lm)) {
|
|
9007
9085
|
let r = t.tools.find((t) => t.name == e);
|
|
9008
9086
|
Z(r != null, `Missing MCP tool ${e}.`), Z(r.description == n.description, `${e} description differs.`), Z(Uc(r.annotations, n.annotations), `${e} annotations differ.`);
|
|
9009
9087
|
let { $schema: i, ...a } = n.inputSchema["~standard"].jsonSchema.input(), { $schema: o, ...s } = r.inputSchema;
|
|
@@ -9014,7 +9092,7 @@ var Em = [
|
|
|
9014
9092
|
{
|
|
9015
9093
|
name: "shares Run pagination, status filters and cancellation between MCP and REST",
|
|
9016
9094
|
async verify(e) {
|
|
9017
|
-
let t = new
|
|
9095
|
+
let t = new Dm((t, n) => e.request(new Request(new URL(t, e.origin), n))), n = await t.createFlow("MCP Run listing"), r = await t.changeDraft(n.flowId, n.draftRevisionId, [{
|
|
9018
9096
|
kind: "graph.node.create",
|
|
9019
9097
|
target: { kind: "flow" },
|
|
9020
9098
|
nodeId: "start",
|
|
@@ -9032,7 +9110,7 @@ var Em = [
|
|
|
9032
9110
|
}
|
|
9033
9111
|
}, a = [];
|
|
9034
9112
|
for (let t = 0; t < 2; t++) {
|
|
9035
|
-
let t = (await
|
|
9113
|
+
let t = (await Om(e, "tools/call", {
|
|
9036
9114
|
name: "flow_run",
|
|
9037
9115
|
arguments: {
|
|
9038
9116
|
...i,
|
|
@@ -9041,7 +9119,7 @@ var Em = [
|
|
|
9041
9119
|
})).structuredContent;
|
|
9042
9120
|
Z(typeof t.runId == "string", "MCP must return an accepted Run ID."), a.push(t.runId);
|
|
9043
9121
|
}
|
|
9044
|
-
let o = (await
|
|
9122
|
+
let o = (await Om(e, "tools/call", {
|
|
9045
9123
|
name: "run_list",
|
|
9046
9124
|
arguments: {
|
|
9047
9125
|
flowId: n.flowId,
|
|
@@ -9055,24 +9133,24 @@ var Em = [
|
|
|
9055
9133
|
});
|
|
9056
9134
|
Z(s.runs.length == 1 && s.runs[0]?.runId != o.runs[0]?.runId, "REST must continue the MCP Run cursor without duplicates.");
|
|
9057
9135
|
let c = await t.listRuns(n.flowId, { limit: 1 });
|
|
9058
|
-
Z(Uc((await
|
|
9136
|
+
Z(Uc((await Om(e, "tools/call", {
|
|
9059
9137
|
name: "run_list",
|
|
9060
9138
|
arguments: {
|
|
9061
9139
|
flowId: n.flowId,
|
|
9062
9140
|
cursor: c.nextCursor,
|
|
9063
9141
|
limit: 1
|
|
9064
9142
|
}
|
|
9065
|
-
})).structuredContent, s), "MCP must continue the REST Run cursor."), await
|
|
9143
|
+
})).structuredContent, s), "MCP must continue the REST Run cursor."), await Om(e, "tools/call", {
|
|
9066
9144
|
name: "run_cancel",
|
|
9067
9145
|
arguments: { runId: a[0] }
|
|
9068
|
-
}), Z(Uc((await
|
|
9146
|
+
}), Z(Uc((await Om(e, "tools/call", {
|
|
9069
9147
|
name: "run_list",
|
|
9070
9148
|
arguments: {
|
|
9071
9149
|
flowId: n.flowId,
|
|
9072
9150
|
status: "canceled"
|
|
9073
9151
|
}
|
|
9074
9152
|
})).structuredContent, await t.listRuns(n.flowId, { status: "canceled" })), "MCP and REST status filters differ.");
|
|
9075
|
-
let l = await
|
|
9153
|
+
let l = await Om(e, "tools/call", {
|
|
9076
9154
|
name: "run_list",
|
|
9077
9155
|
arguments: {
|
|
9078
9156
|
flowId: (await t.createFlow("Other Run scope")).flowId,
|
|
@@ -9088,7 +9166,7 @@ var Em = [
|
|
|
9088
9166
|
let t = {
|
|
9089
9167
|
name: "MCP conformance",
|
|
9090
9168
|
idempotencyKey: crypto.randomUUID()
|
|
9091
|
-
}, n = () =>
|
|
9169
|
+
}, n = () => Om(e, "tools/call", {
|
|
9092
9170
|
name: "flow_create",
|
|
9093
9171
|
arguments: t
|
|
9094
9172
|
}), r = await n();
|
|
@@ -9097,7 +9175,7 @@ var Em = [
|
|
|
9097
9175
|
Z(typeof i.flowId == "string", "MCP did not return a Flow ID."), Z(Uc((await n()).structuredContent, i), "MCP mutation replay changed identity.");
|
|
9098
9176
|
let a = await e.request(new Request(new URL(`/v1/flows/${encodeURIComponent(i.flowId)}/draft`, e.origin)));
|
|
9099
9177
|
Z(a.ok, "REST cannot read the Flow created through MCP."), Z((await a.json()).revisionId == i.draftRevisionId, "MCP and REST disagree on the Draft head.");
|
|
9100
|
-
let o = await
|
|
9178
|
+
let o = await Om(e, "tools/call", {
|
|
9101
9179
|
name: "flow_create",
|
|
9102
9180
|
arguments: {
|
|
9103
9181
|
...t,
|
|
@@ -9107,7 +9185,7 @@ var Em = [
|
|
|
9107
9185
|
Z(o.isError == 1, "MCP must reject a changed idempotent replay."), Z(o.structuredContent.error.code == "flow.conflict", "MCP must preserve the Control error code.");
|
|
9108
9186
|
}
|
|
9109
9187
|
}
|
|
9110
|
-
],
|
|
9188
|
+
], Am = "2026-07-28", jm = Vc(), Q = S().min(1), Mm = Q.max(256).describe("Stable identity for this mutation. Retry with the same key and identical arguments, even after a lost response."), Nm = Zs().min(1).max(100).default(50), Pm = Q.describe("Exact Flow ID returned by flow_list or flow_create."), Fm = Q.describe("Exact Run ID returned by flow_run or run_list."), Im = "Use flow_list and flow_get to inspect a Flow. Use flow_node_get with the observed revisionId for individual node schemas or code. Use flow_schema to learn atomic edit operations, then flow_apply with the observed expectedRevisionId and a stable idempotencyKey. Use flow_check before flow_run. Select an explicit Trigger node ID and fixed revision or publication. A new Flow has no Trigger until you add one. Before adding a Feishu Trigger, use event_source_list and compare its Connection IDs with connector_connections in the Flow scope. If no source is available, create and verify one in Workbench. Use flow_publish to publish a fixed Revision, then poll flow_publish_status until succeeded or failed. Use flow_set_enabled to enable or disable the observed Live publication. flow_run returns an accepted Run, not its final result. Find Runs with run_list, poll run_get and use run_result after terminal. Resolve a waiting Run only with an explicit run_resolve_wait action allowed by run_get. Use run_results and run_result_read to inspect stored Agent tool results; these are separate from the terminal Run result. Retry flow_create, flow_apply, flow_publish and flow_run only with identical arguments and the same idempotencyKey; a new key can execute the Flow again. Other mutations use the same resource identity and arguments when retrying. Cancel a Run explicitly with run_cancel. Use nextCursor and nextAfter to read subsequent pages. Connector-backed deployments may require a Team; inspect connector_teams before creating a Flow.";
|
|
9111
9189
|
function $(e, t, n) {
|
|
9112
9190
|
return {
|
|
9113
9191
|
description: e,
|
|
@@ -9134,17 +9212,17 @@ function $(e, t, n) {
|
|
|
9134
9212
|
} }
|
|
9135
9213
|
};
|
|
9136
9214
|
}
|
|
9137
|
-
var
|
|
9215
|
+
var Lm = {
|
|
9138
9216
|
flow_list: $("List Flows in this deployment. Continue with nextCursor; cursors are compatible with the Control API.", O({
|
|
9139
9217
|
cursor: Q.optional(),
|
|
9140
|
-
limit:
|
|
9218
|
+
limit: Nm
|
|
9141
9219
|
}), !0),
|
|
9142
9220
|
flow_get: $("Read a compact Draft graph with input bindings, port handles, subflows and Live status. Use full=true for complete Revision content, schemas, source code and exact before values required by complex edits. Unreadable Drafts return draft=null and draftIssue; flow.live still identifies the published version. Use draft.revisionId as the base of an edit.", O({
|
|
9143
|
-
flowId:
|
|
9221
|
+
flowId: Pm,
|
|
9144
9222
|
full: T().optional()
|
|
9145
9223
|
}), !0),
|
|
9146
9224
|
flow_node_get: $("Read one node and its Task definition or code module from a fixed Revision. Omit subflowId for the root graph. Use revisionId from flow_get; the returned node contains exact before values for edits.", O({
|
|
9147
|
-
flowId:
|
|
9225
|
+
flowId: Pm,
|
|
9148
9226
|
revisionId: Q,
|
|
9149
9227
|
nodeId: Q,
|
|
9150
9228
|
subflowId: Q.optional()
|
|
@@ -9155,78 +9233,78 @@ var Pm = {
|
|
|
9155
9233
|
}).refine((e) => e.kind == null || e.example == null, "Choose kind or example, not both."), !0),
|
|
9156
9234
|
flow_create: $("Create an empty Flow. If this deployment uses OOMOL Connector, choose a teamId from connector_teams. Keep the key and arguments stable when retrying.", O({
|
|
9157
9235
|
name: Q.refine((e) => e == e.trim() && Fl(e) == null, "Flow name is invalid."),
|
|
9158
|
-
idempotencyKey:
|
|
9236
|
+
idempotencyKey: Mm,
|
|
9159
9237
|
teamId: Q.optional()
|
|
9160
9238
|
}), !1),
|
|
9161
9239
|
flow_apply: $("Apply ordered atomic changes. Read flow_schema first. A stale expectedRevisionId is a conflict; reread the Draft before deciding on a new edit.", O({
|
|
9162
|
-
flowId:
|
|
9240
|
+
flowId: Pm,
|
|
9163
9241
|
expectedRevisionId: Q,
|
|
9164
|
-
idempotencyKey:
|
|
9165
|
-
operations: E(
|
|
9242
|
+
idempotencyKey: Mm,
|
|
9243
|
+
operations: E(jm).min(1).describe("Change operations defined by flow_schema. Explicit IDs and before values refer to the base Revision.")
|
|
9166
9244
|
}), !1),
|
|
9167
9245
|
flow_check: $("Validate a fixed Revision and return diagnostics. Get its revisionId from flow_get or flow_apply.", O({
|
|
9168
|
-
flowId:
|
|
9246
|
+
flowId: Pm,
|
|
9169
9247
|
revisionId: Q
|
|
9170
9248
|
}), !0),
|
|
9171
9249
|
flow_publish: $("Publish a fixed Revision. Supply the observed Live publication ID, or null for the first publication, and a stable idempotencyKey. Returns an operation; poll flow_publish_status for success or failure.", O({
|
|
9172
|
-
flowId:
|
|
9250
|
+
flowId: Pm,
|
|
9173
9251
|
revisionId: Q,
|
|
9174
9252
|
expectedLivePublicationId: Q.nullable(),
|
|
9175
|
-
idempotencyKey:
|
|
9253
|
+
idempotencyKey: Mm
|
|
9176
9254
|
}), !1),
|
|
9177
9255
|
flow_publish_status: $("Read a publish operation. Only succeeded confirms publication; failed includes the failure details. Keep polling while pending.", O({
|
|
9178
|
-
flowId:
|
|
9256
|
+
flowId: Pm,
|
|
9179
9257
|
operationId: Q
|
|
9180
9258
|
}), !0),
|
|
9181
9259
|
flow_set_enabled: $("Enable or disable a published Flow. Supply expectedPublicationId from flow_get; a changed Live publication is a conflict. This does not cancel accepted Runs; use run_cancel for those.", O({
|
|
9182
|
-
flowId:
|
|
9260
|
+
flowId: Pm,
|
|
9183
9261
|
expectedPublicationId: Q,
|
|
9184
9262
|
enabled: T()
|
|
9185
9263
|
}), !1),
|
|
9186
9264
|
flow_run: $("Start a Run and return its runId. For draft supply flowId and revisionId; for live supply publicationId. Always fix the source, Trigger and idempotencyKey. Poll run_get for completion.", lc("source", [O({
|
|
9187
9265
|
source: j("draft"),
|
|
9188
|
-
flowId:
|
|
9266
|
+
flowId: Pm,
|
|
9189
9267
|
revisionId: Q,
|
|
9190
9268
|
trigger: O({
|
|
9191
9269
|
nodeId: Q,
|
|
9192
|
-
outputs: A(S(),
|
|
9270
|
+
outputs: A(S(), jm)
|
|
9193
9271
|
}),
|
|
9194
|
-
inputs: A(S(), A(S(),
|
|
9195
|
-
idempotencyKey:
|
|
9272
|
+
inputs: A(S(), A(S(), jm)).default({}),
|
|
9273
|
+
idempotencyKey: Mm
|
|
9196
9274
|
}), O({
|
|
9197
9275
|
source: j("live"),
|
|
9198
9276
|
publicationId: Q,
|
|
9199
9277
|
trigger: O({
|
|
9200
9278
|
nodeId: Q,
|
|
9201
|
-
outputs: A(S(),
|
|
9279
|
+
outputs: A(S(), jm)
|
|
9202
9280
|
}),
|
|
9203
|
-
inputs: A(S(), A(S(),
|
|
9204
|
-
idempotencyKey:
|
|
9281
|
+
inputs: A(S(), A(S(), jm)).default({}),
|
|
9282
|
+
idempotencyKey: Mm
|
|
9205
9283
|
})]).meta({ type: "object" }), !1),
|
|
9206
9284
|
run_list: $("List Runs for a Flow, optionally filtered by status. Continue with nextCursor; cursors are compatible with the Control API.", O({
|
|
9207
|
-
flowId:
|
|
9285
|
+
flowId: Pm,
|
|
9208
9286
|
pendingWait: T().optional(),
|
|
9209
9287
|
status: mc(Wc).optional(),
|
|
9210
9288
|
cursor: Q.optional(),
|
|
9211
|
-
limit:
|
|
9289
|
+
limit: Nm
|
|
9212
9290
|
}), !0),
|
|
9213
|
-
run_get: $("Read Run status, including waiting details and allowed actions. Completed, failed, canceled and indeterminate are terminal.", O({ runId:
|
|
9291
|
+
run_get: $("Read Run status, including waiting details and allowed actions. Completed, failed, canceled and indeterminate are terminal.", O({ runId: Fm }), !0),
|
|
9214
9292
|
run_events: $("Read one page of Run events. Continue with nextAfter. Events can expire independently of the terminal result.", O({
|
|
9215
|
-
runId:
|
|
9293
|
+
runId: Fm,
|
|
9216
9294
|
after: Zs().min(0).default(0),
|
|
9217
|
-
limit:
|
|
9295
|
+
limit: Nm
|
|
9218
9296
|
}), !0),
|
|
9219
|
-
run_result: $("Read the terminal result. A queued, running or waiting Run returns run.not-terminal; inspect run_get first.", O({ runId:
|
|
9297
|
+
run_result: $("Read the terminal result. A queued, running or waiting Run returns run.not-terminal; inspect run_get first.", O({ runId: Fm }), !0),
|
|
9220
9298
|
run_results: $("List stored Agent tool result metadata for a Run, including Connector and code results. Continue with nextAfter as after. Use run_result_read to inspect content.", O({
|
|
9221
|
-
runId:
|
|
9299
|
+
runId: Fm,
|
|
9222
9300
|
after: Q.optional()
|
|
9223
9301
|
}), !0),
|
|
9224
9302
|
run_result_read: $("Read a bounded page of a stored Agent tool result. Select a JSON Pointer with pointer and continue with nextOffset as offset at the same pointer. A complete value contains all data at that pointer.", Il.extend({
|
|
9225
|
-
runId:
|
|
9303
|
+
runId: Fm,
|
|
9226
9304
|
resultId: Q
|
|
9227
9305
|
}), !0),
|
|
9228
9306
|
run_resolve_wait: $("Explicitly resolve the waitId observed in run_get with one of its allowed actions. Optional comment records the reason (up to 2,000 Unicode code points). The first decision and comment win; inspect resolutionAccepted and action. Resume the same Run and poll run_get; do not create a replacement Run.", O({
|
|
9229
|
-
runId:
|
|
9307
|
+
runId: Fm,
|
|
9230
9308
|
waitId: Q,
|
|
9231
9309
|
action: mc([
|
|
9232
9310
|
"approve",
|
|
@@ -9235,45 +9313,46 @@ var Pm = {
|
|
|
9235
9313
|
]),
|
|
9236
9314
|
comment: Gc
|
|
9237
9315
|
}), !1),
|
|
9238
|
-
run_cancel: $("Explicitly cancel a Run. Inspect cancelAccepted and the authoritative status; completion can win the race.", O({ runId:
|
|
9316
|
+
run_cancel: $("Explicitly cancel a Run. Inspect cancelAccepted and the authoritative status; completion can win the race.", O({ runId: Fm }), !1),
|
|
9239
9317
|
flow_code_connections: $("Read the connections shared by all Code nodes in this Flow. With publicationId, read the fixed published snapshot; it cannot be edited.", O({
|
|
9240
|
-
flowId:
|
|
9318
|
+
flowId: Pm,
|
|
9241
9319
|
publicationId: Q.optional()
|
|
9242
9320
|
}), !0),
|
|
9243
9321
|
flow_connection_candidates: $("List connections and permissions available to select. Node selections do not add shared Code usage.", O({
|
|
9244
|
-
flowId:
|
|
9322
|
+
flowId: Pm,
|
|
9245
9323
|
providerIds: E(Q).min(1)
|
|
9246
9324
|
}), !0),
|
|
9247
9325
|
flow_code_connection_set: $("Add or remove shared Code usage in the Draft only. Does not change node selections or published versions. Use the observed accessRevision.", O({
|
|
9248
|
-
flowId:
|
|
9326
|
+
flowId: Pm,
|
|
9249
9327
|
providerId: Q,
|
|
9250
9328
|
accessBindingId: Q,
|
|
9251
9329
|
selected: T(),
|
|
9252
9330
|
expectedAccessRevision: Zs().nonnegative()
|
|
9253
9331
|
}), !1),
|
|
9254
9332
|
flow_connection_usage_remove: $("Remove a connection from all node selections and shared Code usage in this Draft atomically. Keeps the account, published versions and accepted Runs. Use the observed revisionId and accessRevision.", O({
|
|
9255
|
-
flowId:
|
|
9333
|
+
flowId: Pm,
|
|
9256
9334
|
connectionId: Q,
|
|
9257
9335
|
expectedRevisionId: Q,
|
|
9258
9336
|
expectedAccessRevision: Zs().nonnegative(),
|
|
9259
|
-
idempotencyKey:
|
|
9337
|
+
idempotencyKey: Mm
|
|
9260
9338
|
}), !1),
|
|
9261
9339
|
connector_teams: $("List OOMOL Teams available for Flow creation. An unconfigured or custom Connector may not provide Teams.", O({}), !0),
|
|
9262
|
-
connector_providers: $("List Connector providers available in the Flow scope.", O({ flowId:
|
|
9340
|
+
connector_providers: $("List Connector providers available in the Flow scope.", O({ flowId: Pm.optional() }), !0),
|
|
9263
9341
|
connector_search: $("Search Connector action summaries in the Flow scope. Read complete schemas with connector_get after selecting an action.", O({
|
|
9264
9342
|
query: S().trim().min(1).max(256),
|
|
9265
|
-
flowId:
|
|
9343
|
+
flowId: Pm.optional()
|
|
9266
9344
|
}), !0),
|
|
9267
9345
|
connector_get: $("Read a Connector action, input/output definitions and connection requirements before authoring a node.", O({
|
|
9268
9346
|
actionId: Q,
|
|
9269
|
-
flowId:
|
|
9347
|
+
flowId: Pm.optional()
|
|
9270
9348
|
}), !0),
|
|
9271
9349
|
connector_connections: $("List Connector connections in the Flow scope. Use active connection IDs in bindings.", O({
|
|
9272
9350
|
serviceId: Q.max(256),
|
|
9273
|
-
flowId:
|
|
9351
|
+
flowId: Pm.optional()
|
|
9274
9352
|
}), !0),
|
|
9353
|
+
event_source_list: $("List independent Feishu event sources, including Team, Connection, event types, enabled and verification status. Inspect consumers for Flows actually using each source.", O({}), !0),
|
|
9275
9354
|
trigger_search: $("Search provider Trigger summaries; omit query to list all. Flow trigger instances are in flow_get. Manual, Webhook and Cron are built-in node kinds described by flow_schema.", O({ query: S().trim().min(1).max(256).optional() }), !0),
|
|
9276
9355
|
trigger_get: $("Read a provider Trigger definition before creating its node.", O({ key: Q }), !0)
|
|
9277
9356
|
};
|
|
9278
9357
|
//#endregion
|
|
9279
|
-
export {
|
|
9358
|
+
export { km as mcpConformanceCases, Im as mcpInstructions, Am as mcpProtocolVersion, Lm as mcpTools };
|