@uipath/packager-tool-businessrules 1.204.0 → 1.205.0-preview.258
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/{DmnFactory-VWZOSZHH-66f0ytwb.js → DmnFactory-L7MABUC6-2se4hby1.js} +146 -101
- package/dist/{KieDmnMarshaller-6TTUU5B4-t01scx0r.js → KieDmnMarshaller-LGE63WDG-j2aa6x0t.js} +3 -3
- package/dist/THIRD-PARTY-NOTICES.md +6 -6
- package/dist/hitPolicyResult-CGCR73CW-g7y41q6z.js +66 -0
- package/dist/index-a205z888.js +94 -0
- package/dist/index-n20hpx9v.js +227 -0
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/hitPolicyResult-4WDHTX4A-g09v8d92.js +0 -69
- package/dist/index-0x5ex1ph.js +0 -200
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
e
|
|
3
|
-
} from "./index-w023hd2z.js";
|
|
4
1
|
import {
|
|
5
2
|
v4_default
|
|
6
3
|
} from "./index-tnyxsstx.js";
|
|
4
|
+
import {
|
|
5
|
+
e
|
|
6
|
+
} from "./index-w023hd2z.js";
|
|
7
7
|
import"./index-80pa5crh.js";
|
|
8
8
|
import"./index-rd3cw6s5.js";
|
|
9
9
|
|
|
@@ -3844,149 +3844,194 @@ var parser = LRParser.deserialize({
|
|
|
3844
3844
|
tokenPrec: 2660
|
|
3845
3845
|
});
|
|
3846
3846
|
|
|
3847
|
-
// ../../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-
|
|
3848
|
-
var
|
|
3849
|
-
var
|
|
3850
|
-
var
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3847
|
+
// ../../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-EXAD3CI5.js
|
|
3848
|
+
var R = parser.configure({ top: "UnaryTests" });
|
|
3849
|
+
var c = (e2, t2) => (t2 === "unaryTests" ? R : parser).parse(e2);
|
|
3850
|
+
var I = new Set(["StringLiteral", "NumericLiteral", "BooleanLiteral", "DateTimeLiteral", "null"]);
|
|
3851
|
+
var g = (e2) => e2.parent?.name === "FunctionInvocation" && e2.parent.firstChild?.from === e2.from;
|
|
3852
|
+
var P = (e2, t2, i) => {
|
|
3853
|
+
for (let r = e2.parent;r; r = r.parent)
|
|
3854
|
+
if (!(r.name !== "ForExpression" && r.name !== "QuantifiedExpression"))
|
|
3855
|
+
for (let n = r.getChild("InExpressions")?.firstChild;n; n = n.nextSibling) {
|
|
3856
|
+
let s = n.getChild("Name");
|
|
3857
|
+
if (s && e2.from >= n.to && i.slice(s.from, s.to) === t2)
|
|
3856
3858
|
return true;
|
|
3857
3859
|
}
|
|
3858
3860
|
return false;
|
|
3859
3861
|
};
|
|
3860
|
-
var
|
|
3861
|
-
for (let
|
|
3862
|
-
if (
|
|
3863
|
-
for (let n =
|
|
3864
|
-
let
|
|
3865
|
-
if (
|
|
3862
|
+
var C = (e2, t2, i) => {
|
|
3863
|
+
for (let r = e2.parent;r; r = r.parent)
|
|
3864
|
+
if (r.name === "FunctionDefinition")
|
|
3865
|
+
for (let n = r.getChild("FormalParameters")?.firstChild;n; n = n.nextSibling) {
|
|
3866
|
+
let s = n.getChild("ParameterName")?.getChild("Name");
|
|
3867
|
+
if (s && i.slice(s.from, s.to) === t2)
|
|
3866
3868
|
return true;
|
|
3867
3869
|
}
|
|
3868
3870
|
return false;
|
|
3869
3871
|
};
|
|
3870
|
-
var
|
|
3871
|
-
for (let
|
|
3872
|
-
if (
|
|
3873
|
-
for (let n =
|
|
3872
|
+
var _ = (e2, t2, i) => {
|
|
3873
|
+
for (let r = e2.parent;r; r = r.parent)
|
|
3874
|
+
if (r.name === "Context")
|
|
3875
|
+
for (let n = r.firstChild;n; n = n.nextSibling) {
|
|
3874
3876
|
if (n.name !== "ContextEntry" || n.to > e2.from)
|
|
3875
3877
|
continue;
|
|
3876
|
-
let
|
|
3877
|
-
if (
|
|
3878
|
+
let s = n.getChild("Key")?.getChild("Name");
|
|
3879
|
+
if (s && i.slice(s.from, s.to) === t2)
|
|
3878
3880
|
return true;
|
|
3879
3881
|
}
|
|
3880
3882
|
return false;
|
|
3881
3883
|
};
|
|
3882
|
-
var
|
|
3883
|
-
var
|
|
3884
|
+
var M = (e2, t2, i) => P(e2, t2, i) || C(e2, t2, i) || _(e2, t2, i);
|
|
3885
|
+
var A = (e2) => {
|
|
3884
3886
|
for (let t2 = e2.parent;t2; t2 = t2.parent)
|
|
3885
3887
|
if (t2.name === "FilterExpression" && t2.firstChild && e2.from >= t2.firstChild.to)
|
|
3886
3888
|
return true;
|
|
3887
3889
|
return false;
|
|
3888
3890
|
};
|
|
3889
|
-
var
|
|
3890
|
-
(t2
|
|
3891
|
+
var u = (e2, t2, i) => {
|
|
3892
|
+
c(e2, t2).iterate({ enter(n) {
|
|
3891
3893
|
if (n.name !== "VariableName")
|
|
3892
3894
|
return;
|
|
3893
|
-
let
|
|
3894
|
-
|
|
3895
|
+
let s = n.node, o = e2.slice(s.from, s.to);
|
|
3896
|
+
g(s) || M(s, o, e2) || i(s, o);
|
|
3895
3897
|
} });
|
|
3896
3898
|
};
|
|
3897
|
-
var
|
|
3899
|
+
var T = (e2, t2, i) => {
|
|
3898
3900
|
if (!e2 || !e2.includes(t2))
|
|
3899
3901
|
return [];
|
|
3900
|
-
let
|
|
3901
|
-
return
|
|
3902
|
-
|
|
3903
|
-
}),
|
|
3902
|
+
let r = [];
|
|
3903
|
+
return u(e2, i, (n, s) => {
|
|
3904
|
+
s === t2 && r.push({ from: n.from, to: n.to });
|
|
3905
|
+
}), r;
|
|
3904
3906
|
};
|
|
3905
|
-
var b = (e2, t2
|
|
3907
|
+
var b = (e2, t2) => {
|
|
3906
3908
|
if (!e2.trim())
|
|
3907
3909
|
return [];
|
|
3908
3910
|
let i = [];
|
|
3909
|
-
return
|
|
3910
|
-
(
|
|
3911
|
+
return u(e2, t2, (r, n) => {
|
|
3912
|
+
i.push({ name: n, path: D(r, e2, true), segments: F(r, e2, false), from: r.from, to: r.to, inFilterPredicate: A(r) });
|
|
3911
3913
|
}), i;
|
|
3912
3914
|
};
|
|
3913
|
-
var
|
|
3915
|
+
var F = (e2, t2, i) => {
|
|
3916
|
+
let r = [{ name: t2.slice(e2.from, e2.to), from: e2.from, to: e2.to }], n = e2, s = n.parent;
|
|
3917
|
+
for (;s && (s.name === "PathExpression" || i && s.name === "FilterExpression") && s.from === n.from; ) {
|
|
3918
|
+
let o = s.name === "PathExpression" ? s.getChild("PathName") : null;
|
|
3919
|
+
o && r.push({ name: t2.slice(o.from, o.to), from: o.from, to: o.to }), n = s, s = n.parent;
|
|
3920
|
+
}
|
|
3921
|
+
return r;
|
|
3922
|
+
};
|
|
3923
|
+
var D = (e2, t2, i) => F(e2, t2, i).map((r) => r.name).join(".");
|
|
3924
|
+
var h = (e2) => {
|
|
3914
3925
|
let t2 = e2.trim();
|
|
3915
3926
|
if (!t2)
|
|
3916
3927
|
return false;
|
|
3917
|
-
let
|
|
3918
|
-
return
|
|
3928
|
+
let i = T(t2, t2, "expression");
|
|
3929
|
+
return i.length === 1 && i[0].from === 0 && i[0].to === t2.length;
|
|
3919
3930
|
};
|
|
3920
|
-
var
|
|
3921
|
-
var
|
|
3922
|
-
var
|
|
3923
|
-
var
|
|
3924
|
-
var
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3931
|
+
var a = (e2) => `${e2}_${v4_default()}`;
|
|
3932
|
+
var v = { all: new Set, outsideFilterPredicates: new Set, paths: new Set };
|
|
3933
|
+
var B = new WeakMap;
|
|
3934
|
+
var U = { expression: new WeakMap, unaryTests: new WeakMap };
|
|
3935
|
+
var l = (e2, t2, i = B) => {
|
|
3936
|
+
let r = i.get(e2);
|
|
3937
|
+
if (r)
|
|
3938
|
+
return r;
|
|
3939
|
+
let n = t2(e2);
|
|
3940
|
+
return i.set(e2, n), n;
|
|
3941
|
+
};
|
|
3942
|
+
var p = (e2, t2) => {
|
|
3943
|
+
let i = e2?.trim();
|
|
3944
|
+
if (!i || t2 === "unaryTests" && i === "-")
|
|
3945
|
+
return v;
|
|
3946
|
+
let r = b(i, t2);
|
|
3947
|
+
return { all: new Set(r.map((n) => n.name)), outsideFilterPredicates: new Set(r.filter((n) => !n.inFilterPredicate).map((n) => n.name)), paths: new Set(r.map((n) => n.path)) };
|
|
3948
|
+
};
|
|
3949
|
+
var m = (e2) => {
|
|
3950
|
+
let t2 = new Set, i = new Set, r = new Set;
|
|
3951
|
+
for (let n of e2) {
|
|
3952
|
+
for (let s of n.paths)
|
|
3953
|
+
r.add(s);
|
|
3954
|
+
for (let s of n.all)
|
|
3955
|
+
t2.add(s);
|
|
3956
|
+
for (let s of n.outsideFilterPredicates)
|
|
3957
|
+
i.add(s);
|
|
3958
|
+
}
|
|
3959
|
+
return { all: t2, outsideFilterPredicates: i, paths: r };
|
|
3960
|
+
};
|
|
3961
|
+
var N = (e2, t2) => l(e2, () => p(e2.text, t2), U[t2]);
|
|
3962
|
+
var V = (e2) => l(e2, () => m([p(e2.expressionText, "expression"), p(e2.allowedValues?.text, "unaryTests")]));
|
|
3963
|
+
var k = (e2) => l(e2, () => p(e2.allowedValues?.text, "unaryTests"));
|
|
3964
|
+
var q = (e2) => l(e2, () => m([...e2.inputEntries.map((t2) => N(t2, "unaryTests")), ...e2.outputEntries.map((t2) => N(t2, "expression"))]));
|
|
3965
|
+
var $ = (e2) => l(e2, () => m(e2.map(q)));
|
|
3966
|
+
var S = (e2) => l(e2, () => m([...e2.inputs.map(V), ...e2.outputs.map(k), $(e2.rules)]));
|
|
3967
|
+
var E = (e2) => S(e2).all;
|
|
3968
|
+
var j = "Annotation";
|
|
3969
|
+
var W = "Decision";
|
|
3970
|
+
var H = "decision1";
|
|
3971
|
+
var z = "UiPath Maestro";
|
|
3972
|
+
var K = () => ({ id: a("definitions"), namespace: `http://uipath.com/dmn/${a("ns")}`, exporter: z });
|
|
3973
|
+
var X = "null";
|
|
3974
|
+
var Re = (e2) => {
|
|
3928
3975
|
let t2 = (e2 ?? "").trim();
|
|
3929
|
-
return t2 === "" || t2 ===
|
|
3976
|
+
return t2 === "" || t2 === X;
|
|
3930
3977
|
};
|
|
3931
|
-
var
|
|
3932
|
-
var
|
|
3933
|
-
var
|
|
3934
|
-
let t2 =
|
|
3935
|
-
return
|
|
3978
|
+
var Y = (e2) => ({ ...K(), name: e2, decision: { id: a("decision"), name: H, label: W, variableId: a("variable"), variableTypeRef: "string", decisionTable: { id: a("decisionTable"), hitPolicy: e.First, inputs: [{ id: a("input"), label: "Input 1", expressionId: a("inputExpression"), expressionText: "", typeRef: "string" }], outputs: [ie()], annotations: [{ name: j }], rules: [{ id: a("rule"), inputEntries: [{ id: a("inputEntry"), text: "-" }], outputEntries: [{ id: a("outputEntry"), text: "" }], annotationEntries: [""] }] } }, inputData: [] });
|
|
3979
|
+
var y = "input1";
|
|
3980
|
+
var Ie = (e2) => {
|
|
3981
|
+
let t2 = Y(e2), [i] = t2.decision.decisionTable.inputs;
|
|
3982
|
+
return re({ ...t2, inputData: [{ id: a("inputData"), variableId: a("variable"), name: y, typeRef: i.typeRef }], decision: { ...t2.decision, decisionTable: { ...t2.decision.decisionTable, inputs: [{ ...i, expressionText: y }] } } });
|
|
3936
3983
|
};
|
|
3937
|
-
var
|
|
3938
|
-
var
|
|
3939
|
-
var
|
|
3940
|
-
var
|
|
3941
|
-
var
|
|
3942
|
-
let
|
|
3943
|
-
if (!/^[\p{L}_]/u.test(
|
|
3944
|
-
return
|
|
3945
|
-
let n =
|
|
3946
|
-
return
|
|
3984
|
+
var Pe = /[\p{L}\p{N}_]/u;
|
|
3985
|
+
var Q = /^[\p{L}_][\p{L}\p{N}_]*(\s*\.\s*[\p{L}_][\p{L}\p{N}_]*)*$/u;
|
|
3986
|
+
var G = /^[\p{L}_][\p{L}\p{N}_]*$/u;
|
|
3987
|
+
var J = (e2) => G.test(e2.trim()) && h(e2);
|
|
3988
|
+
var Z = (e2, t2) => {
|
|
3989
|
+
let i = `output${t2 + 1}`, r = (e2 ?? "").replace(/[^\p{L}\p{N}_]+(.)?/gu, (s, o) => o ? o.toUpperCase() : "");
|
|
3990
|
+
if (!/^[\p{L}_]/u.test(r))
|
|
3991
|
+
return i;
|
|
3992
|
+
let n = r.charAt(0).toLowerCase() + r.slice(1);
|
|
3993
|
+
return J(n) ? n : i;
|
|
3947
3994
|
};
|
|
3948
|
-
var
|
|
3949
|
-
var
|
|
3950
|
-
var
|
|
3995
|
+
var ee = (e2, t2) => e2.name?.trim() || Z(e2.label, t2);
|
|
3996
|
+
var Ce = (e2) => e2 > 1;
|
|
3997
|
+
var _e = (e2) => e2.trim().split(".").map((t2) => t2.trim()).join(".");
|
|
3998
|
+
var Me = (e2) => {
|
|
3951
3999
|
let t2 = e2.trim();
|
|
3952
|
-
if (!(!t2 || !
|
|
4000
|
+
if (!(!t2 || !Q.test(t2)))
|
|
3953
4001
|
return t2.split(".")[0].trim() || undefined;
|
|
3954
4002
|
};
|
|
3955
|
-
var
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
4003
|
+
var te = (e2, t2) => e2?.trim() ? e2 : t2?.trim() ? t2 : "";
|
|
4004
|
+
var ne = (e2) => te(e2.variableName, e2.name);
|
|
4005
|
+
var re = (e2) => {
|
|
4006
|
+
let t2 = E(e2.decision.decisionTable), i = (n) => t2.has(ne(n)) ? n.requirementId ?? a("informationRequirement") : n.requirementFromSource ? n.requirementId : undefined, r = e2.inputData.map((n) => {
|
|
4007
|
+
let s = i(n);
|
|
4008
|
+
return s === n.requirementId ? n : { ...n, requirementId: s };
|
|
3959
4009
|
});
|
|
3960
|
-
return
|
|
3961
|
-
};
|
|
3962
|
-
var $ = (e2) => {
|
|
3963
|
-
let t2 = new Set;
|
|
3964
|
-
for (let o of e2)
|
|
3965
|
-
for (let i of b(o.expressionText, "expression"))
|
|
3966
|
-
t2.add(i.name);
|
|
3967
|
-
return t2;
|
|
4010
|
+
return r.some((n, s) => n !== e2.inputData[s]) ? { ...e2, inputData: r } : e2;
|
|
3968
4011
|
};
|
|
3969
|
-
function
|
|
3970
|
-
let e2 = { id:
|
|
3971
|
-
return { ...e2, name:
|
|
4012
|
+
function ie() {
|
|
4013
|
+
let e2 = { id: a("output"), label: "Output 1", typeRef: "string" };
|
|
4014
|
+
return { ...e2, name: ee(e2, 0) };
|
|
3972
4015
|
}
|
|
3973
4016
|
export {
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
4017
|
+
j as DEFAULT_ANNOTATION_CLAUSE_NAME,
|
|
4018
|
+
W as DEFAULT_DECISION_NAME,
|
|
4019
|
+
X as EMPTY_OUTPUT_TEXT,
|
|
4020
|
+
Pe as FEEL_NAME_CHAR,
|
|
4021
|
+
z as MAESTRO_EXPORTER,
|
|
4022
|
+
K as createBusinessRuleIdentity,
|
|
4023
|
+
Y as createNewBusinessRuleModel,
|
|
4024
|
+
Ie as createSeededBusinessRuleModel,
|
|
4025
|
+
Me as expressionRoot,
|
|
4026
|
+
ne as inputDataIdentifier,
|
|
4027
|
+
Re as isEmptyOutputText,
|
|
4028
|
+
J as isFeelIdentifier,
|
|
4029
|
+
_e as normalizeIdentifierPath,
|
|
4030
|
+
ee as outputArgumentName,
|
|
4031
|
+
Z as outputNameFromLabel,
|
|
4032
|
+
re as reconcileInputData,
|
|
4033
|
+
te as resolvedIdentifier,
|
|
4034
|
+
Ce as resultIsKeyedByClause
|
|
3990
4035
|
};
|
|
3991
4036
|
|
|
3992
|
-
//# debugId=
|
|
4037
|
+
//# debugId=EBDAED2F19D28F3D64756E2164756E21
|
package/dist/{KieDmnMarshaller-6TTUU5B4-t01scx0r.js → KieDmnMarshaller-LGE63WDG-j2aa6x0t.js}
RENAMED
|
@@ -9783,7 +9783,7 @@ var $normalizeLineEndings = domParser.normalizeLineEndings;
|
|
|
9783
9783
|
var $onErrorStopParsing = domParser.onErrorStopParsing;
|
|
9784
9784
|
var $onWarningStopParsing = domParser.onWarningStopParsing;
|
|
9785
9785
|
|
|
9786
|
-
// ../../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-
|
|
9786
|
+
// ../../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-YWHJRFPT.js
|
|
9787
9787
|
var oe = n((u) => {
|
|
9788
9788
|
var S = u && u.__assign || function() {
|
|
9789
9789
|
return S = Object.assign || function(e) {
|
|
@@ -10389,7 +10389,7 @@ async function bs(e) {
|
|
|
10389
10389
|
return { status: "error", reason: "migration-failed" };
|
|
10390
10390
|
}
|
|
10391
10391
|
try {
|
|
10392
|
-
return { status: "ready", document: Ot(r), losses: s };
|
|
10392
|
+
return { status: "ready", document: Ot(r), originalVersion: n2, losses: s };
|
|
10393
10393
|
} catch (i) {
|
|
10394
10394
|
return console.error("DMN: the marshaller could not read a well-formed document", i), { status: "error", reason: "invalid-xml" };
|
|
10395
10395
|
}
|
|
@@ -10409,4 +10409,4 @@ export {
|
|
|
10409
10409
|
Is as refusalToWriteBack
|
|
10410
10410
|
};
|
|
10411
10411
|
|
|
10412
|
-
//# debugId=
|
|
10412
|
+
//# debugId=694AC308F50FF4A464756E2164756E21
|
|
@@ -12,13 +12,13 @@ those licences require.
|
|
|
12
12
|
- @lezer/common@1.5.3 — MIT
|
|
13
13
|
- @lezer/highlight@1.2.5 — MIT
|
|
14
14
|
- @lezer/lr@1.4.10 — MIT
|
|
15
|
-
- @uipath/dmn-editor-utils@0.
|
|
15
|
+
- @uipath/dmn-editor-utils@0.1201.7 — SEE LICENSE IN LICENSE.txt
|
|
16
16
|
- @xmldom/xmldom@0.9.12 — MIT
|
|
17
17
|
- dmn-moddle@10.0.0 — MIT
|
|
18
18
|
- ids@1.0.5 — MIT
|
|
19
|
+
- min-dash@5.1.0 — MIT
|
|
19
20
|
- min-dash@3.8.1 — MIT
|
|
20
21
|
- min-dash@4.2.3 — MIT
|
|
21
|
-
- min-dash@5.1.0 — MIT
|
|
22
22
|
- moddle@5.0.4 — MIT
|
|
23
23
|
- moddle-xml@9.0.6 — MIT
|
|
24
24
|
- saxen@8.1.2 — MIT
|
|
@@ -176,7 +176,7 @@ THE SOFTWARE.
|
|
|
176
176
|
|
|
177
177
|
---
|
|
178
178
|
|
|
179
|
-
## @uipath/dmn-editor-utils@0.
|
|
179
|
+
## @uipath/dmn-editor-utils@0.1201.7
|
|
180
180
|
|
|
181
181
|
SPDX: SEE LICENSE IN LICENSE.txt
|
|
182
182
|
|
|
@@ -265,7 +265,7 @@ THE SOFTWARE.
|
|
|
265
265
|
|
|
266
266
|
---
|
|
267
267
|
|
|
268
|
-
## min-dash@
|
|
268
|
+
## min-dash@5.1.0
|
|
269
269
|
|
|
270
270
|
SPDX: MIT
|
|
271
271
|
|
|
@@ -295,7 +295,7 @@ THE SOFTWARE.
|
|
|
295
295
|
|
|
296
296
|
---
|
|
297
297
|
|
|
298
|
-
## min-dash@
|
|
298
|
+
## min-dash@3.8.1
|
|
299
299
|
|
|
300
300
|
SPDX: MIT
|
|
301
301
|
|
|
@@ -325,7 +325,7 @@ THE SOFTWARE.
|
|
|
325
325
|
|
|
326
326
|
---
|
|
327
327
|
|
|
328
|
-
## min-dash@
|
|
328
|
+
## min-dash@4.2.3
|
|
329
329
|
|
|
330
330
|
SPDX: MIT
|
|
331
331
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
R,
|
|
3
|
+
X
|
|
4
|
+
} from "./index-a205z888.js";
|
|
5
|
+
import {
|
|
6
|
+
e,
|
|
7
|
+
i,
|
|
8
|
+
n,
|
|
9
|
+
r
|
|
10
|
+
} from "./index-w023hd2z.js";
|
|
11
|
+
import"./index-80pa5crh.js";
|
|
12
|
+
import"./index-rd3cw6s5.js";
|
|
13
|
+
|
|
14
|
+
// ../../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-JAGAV2EF.js
|
|
15
|
+
var f = new Set([e.Collect, e.RuleOrder, e.OutputOrder]);
|
|
16
|
+
var m = new Set([e.Priority, e.OutputOrder]);
|
|
17
|
+
var O = (e2) => e2.hitPolicy === e.Collect && e2.aggregation ? e2.aggregation : f.has(e2.hitPolicy) ? "list" : "value";
|
|
18
|
+
var R2 = (e2) => !!e2 && i.includes(e2);
|
|
19
|
+
var C = (e2, n2) => e2 === n.Sum || e2 === n.Count ? "number" : n2?.typeRef;
|
|
20
|
+
var p = (e2, n2) => n2.typeRef ?? (e2.decision.decisionTable.outputs.length === 1 ? e2.decision.variableTypeRef : undefined);
|
|
21
|
+
var T = (e2, n2) => X(e2, n2).isCollection;
|
|
22
|
+
var g = (e2) => r.includes(R(e2));
|
|
23
|
+
var x = (e2, n2) => {
|
|
24
|
+
let t = X(e2, n2);
|
|
25
|
+
if (t.isCollection || t.foreign)
|
|
26
|
+
return false;
|
|
27
|
+
let i2 = t.baseTypeRef;
|
|
28
|
+
return i2 === undefined || g(i2) && i2 !== "Any";
|
|
29
|
+
};
|
|
30
|
+
var u = (e2, n2) => {
|
|
31
|
+
let t = X(e2, n2);
|
|
32
|
+
if (t.foreign)
|
|
33
|
+
return "Any";
|
|
34
|
+
if (t.baseTypeRef !== undefined)
|
|
35
|
+
return t.baseTypeRef;
|
|
36
|
+
let i2 = t.chain[t.chain.length - 1];
|
|
37
|
+
return i2 ? R(i2.name) : undefined;
|
|
38
|
+
};
|
|
39
|
+
var E = (e2, n2) => n2 && g(n2) ? n2 : u(e2, n2);
|
|
40
|
+
var A = (e2, n2) => {
|
|
41
|
+
let t = p(e2, n2), i2 = n2.allowedValues?.text.trim() || X(e2, t).chain.find((r2) => r2.allowedValues?.trim())?.allowedValues;
|
|
42
|
+
return i2 ? { text: i2, typeRef: u(e2, t) } : undefined;
|
|
43
|
+
};
|
|
44
|
+
var S = (e2, n2, t) => {
|
|
45
|
+
if (n2 === n.Count)
|
|
46
|
+
return true;
|
|
47
|
+
let i2 = p(e2, t), r2 = u(e2, i2);
|
|
48
|
+
return !T(e2, i2) && (!r2 || ["number", "Any"].includes(R(r2)));
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
f as LIST_HIT_POLICIES,
|
|
52
|
+
m as RANKED_HIT_POLICIES,
|
|
53
|
+
C as aggregateTypeRef,
|
|
54
|
+
A as allowedValuesOf,
|
|
55
|
+
u as baseTypeRefOf,
|
|
56
|
+
g as isBuiltInTypeRef,
|
|
57
|
+
R2 as isCollectAggregation,
|
|
58
|
+
x as isKnownSingleValueTypeRef,
|
|
59
|
+
T as isListTypeRef,
|
|
60
|
+
S as isOutputAggregatable,
|
|
61
|
+
p as outputTypeRefOf,
|
|
62
|
+
O as resultShapeOf,
|
|
63
|
+
E as valueTypeRefOf
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
//# debugId=33F6D546AD00CE9E64756E2164756E21
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// ../../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-HIWFLOJ4.js
|
|
2
|
+
var x = (e) => e.includes(":") ? e.split(":").pop() ?? e : e;
|
|
3
|
+
var w = new Set(["number", "integer", "long", "double", "decimal"]);
|
|
4
|
+
var $ = (e) => w.has(x(e));
|
|
5
|
+
var R = (e) => $(e) ? "number" : x(e);
|
|
6
|
+
var m = (e) => {
|
|
7
|
+
let n = Object.entries(e ?? {}).flatMap(([t, o]) => t.startsWith("@_xmlns:") && typeof o == "string" ? [[t.slice(8), o]] : []);
|
|
8
|
+
return n.length ? Object.fromEntries(n) : undefined;
|
|
9
|
+
};
|
|
10
|
+
var A = (e) => {
|
|
11
|
+
let n = new Set, t = (s) => {
|
|
12
|
+
let r = s;
|
|
13
|
+
for (let i = 2;n.has(r); i++)
|
|
14
|
+
r = `${s}#${i}`;
|
|
15
|
+
return n.add(r), r;
|
|
16
|
+
}, o = (s, r) => {
|
|
17
|
+
let i = s["@_id"] || t(r), a = s.itemComponent?.map((l) => o(l, `${i}/${l["@_name"]}`)), p = m(s), c = m(s.typeRef);
|
|
18
|
+
return { id: i, name: s["@_name"] ?? "", isCollection: s["@_isCollection"] === true, typeRef: s.typeRef?.__$$text, allowedValues: s.allowedValues?.text?.__$$text, ...a?.length ? { components: a } : {}, ...p ? { namespaces: p } : {}, ...c ? { typeRefNamespaces: c } : {} };
|
|
19
|
+
};
|
|
20
|
+
return e.itemDefinition?.map((s) => o(s, `itemDefinition/${s["@_name"]}`));
|
|
21
|
+
};
|
|
22
|
+
var C = /^([\p{L}_][\p{L}\p{N}_.-]*):(.+)$/u;
|
|
23
|
+
var L = /^https?:\/\/www\.omg\.org\/spec\/(?:FEEL\/\d{8}|DMN\/\d{8}\/FEEL)\/?$/;
|
|
24
|
+
var y = (e, n) => n.find((t) => Object.prototype.hasOwnProperty.call(t, e))?.[e];
|
|
25
|
+
var I = (e) => e.flatMap((n) => {
|
|
26
|
+
let t = m(n);
|
|
27
|
+
return t ? [t] : [];
|
|
28
|
+
});
|
|
29
|
+
var F = new Map;
|
|
30
|
+
var b = new WeakMap;
|
|
31
|
+
var N = (e) => {
|
|
32
|
+
if (!e)
|
|
33
|
+
return F;
|
|
34
|
+
let n = b.get(e);
|
|
35
|
+
if (!n) {
|
|
36
|
+
let t = new Map;
|
|
37
|
+
for (let o of e)
|
|
38
|
+
t.has(o.name) || t.set(o.name, o);
|
|
39
|
+
n = t, b.set(e, n);
|
|
40
|
+
}
|
|
41
|
+
return n;
|
|
42
|
+
};
|
|
43
|
+
var d = (e, n, t) => {
|
|
44
|
+
let o = C.exec(e);
|
|
45
|
+
if (!o)
|
|
46
|
+
return { name: e, space: "local" };
|
|
47
|
+
let s = y(o[1], n);
|
|
48
|
+
return s === undefined ? { name: o[2], space: "foreign" } : s === t.namespace ? { name: o[2], space: "local" } : { name: o[2], space: L.test(s) ? "feel" : "foreign" };
|
|
49
|
+
};
|
|
50
|
+
var u = (e) => e.namespaces ? [e.namespaces] : [];
|
|
51
|
+
var g = (e, n) => {
|
|
52
|
+
let t = e.namespaces ? [e.namespaces, ...n] : n;
|
|
53
|
+
return { scope: t, typeRefScope: e.typeRefNamespaces ? [e.typeRefNamespaces, ...t] : t };
|
|
54
|
+
};
|
|
55
|
+
var E = (e, n, t, o = [], s = t) => {
|
|
56
|
+
let r = N(e.itemDefinitions);
|
|
57
|
+
for (;; ) {
|
|
58
|
+
let i = o.some((D) => D.isCollection);
|
|
59
|
+
if (n === undefined || o[o.length - 1]?.components?.length)
|
|
60
|
+
return { chain: o, scope: s, isCollection: i };
|
|
61
|
+
let { name: a, space: p } = d(n, t, e);
|
|
62
|
+
if (p === "foreign")
|
|
63
|
+
return { chain: o, scope: s, isCollection: i, foreign: true };
|
|
64
|
+
let c = p === "local" ? r.get(a) : undefined, l = c ? o.indexOf(c) : -1;
|
|
65
|
+
if (l >= 0 && o.slice(l).some((D) => D.isCollection))
|
|
66
|
+
return { chain: o, scope: s, isCollection: i, recursive: true };
|
|
67
|
+
if (!c || l >= 0)
|
|
68
|
+
return { chain: o, scope: s, isCollection: i, baseTypeRef: R(a) };
|
|
69
|
+
o.push(c), { scope: s, typeRefScope: t } = g(c, u(e)), n = c.typeRef;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
var P = (e, n, t) => {
|
|
73
|
+
let { scope: o, typeRefScope: s } = g(e, n);
|
|
74
|
+
return E(t, e.typeRef, s, [e], o);
|
|
75
|
+
};
|
|
76
|
+
var h = ({ scope: e, ...n }, t, o) => {
|
|
77
|
+
let s = n.chain[n.chain.length - 1];
|
|
78
|
+
if (!s?.components?.length)
|
|
79
|
+
return n;
|
|
80
|
+
if (o.has(s))
|
|
81
|
+
return { ...n, recursive: true };
|
|
82
|
+
let r = new Set(o).add(s), i = s.components.map((a) => ({ id: a.id, name: a.name, type: h(P(a, e, t), t, r) }));
|
|
83
|
+
return { ...n, components: i };
|
|
84
|
+
};
|
|
85
|
+
var v = (e, n, t) => E(e, n, [...t, ...u(e)]);
|
|
86
|
+
var J = (e, n, t = []) => h(v(e, n, t), e, new Set);
|
|
87
|
+
var X = (e, n, t = []) => {
|
|
88
|
+
let { scope: o, ...s } = v(e, n, t);
|
|
89
|
+
return s;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export { R, m, A, I, J, X };
|
|
93
|
+
|
|
94
|
+
//# debugId=53752B5CA183AAE064756E2164756E21
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import {
|
|
2
|
+
v4_default
|
|
3
|
+
} from "./index-tnyxsstx.js";
|
|
4
|
+
import {
|
|
5
|
+
A,
|
|
6
|
+
I,
|
|
7
|
+
J,
|
|
8
|
+
m
|
|
9
|
+
} from "./index-a205z888.js";
|
|
10
|
+
import"./index-w023hd2z.js";
|
|
11
|
+
import"./index-80pa5crh.js";
|
|
12
|
+
import {
|
|
13
|
+
__require
|
|
14
|
+
} from "./index-rd3cw6s5.js";
|
|
15
|
+
|
|
16
|
+
// ../../../node_modules/@uipath/dmn-editor-utils/dist/entry-points/index.js
|
|
17
|
+
function ne(e) {
|
|
18
|
+
switch (e.toLowerCase()) {
|
|
19
|
+
case "boolean":
|
|
20
|
+
return "boolean";
|
|
21
|
+
case "number":
|
|
22
|
+
case "integer":
|
|
23
|
+
case "long":
|
|
24
|
+
case "double":
|
|
25
|
+
case "decimal":
|
|
26
|
+
return "number";
|
|
27
|
+
case "date":
|
|
28
|
+
return "date";
|
|
29
|
+
case "time":
|
|
30
|
+
return "time";
|
|
31
|
+
case "date and time":
|
|
32
|
+
case "datetime":
|
|
33
|
+
return "datetime";
|
|
34
|
+
case "array":
|
|
35
|
+
return "array";
|
|
36
|
+
case "any":
|
|
37
|
+
case "object":
|
|
38
|
+
return "object";
|
|
39
|
+
default:
|
|
40
|
+
return "string";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
var te = { date: { type: "string", format: "date" }, datetime: { type: "string", format: "date-time" }, time: { type: "string", format: "time" } };
|
|
44
|
+
var $ = (e) => te[e] ?? (e === "array" ? { type: "array", items: {} } : { type: e });
|
|
45
|
+
var L = (e) => e._jsonSchema ?? $(e.type);
|
|
46
|
+
var Y = (e) => {
|
|
47
|
+
let n = e.type === "array" ? e.items?.type : undefined;
|
|
48
|
+
return { _jsonSchema: e, ...typeof n == "string" ? { subType: n } : {} };
|
|
49
|
+
};
|
|
50
|
+
var I2 = "x-uipath-decision-keyed";
|
|
51
|
+
var H = "x-uipath-rows";
|
|
52
|
+
var se = (e) => Object.entries(e.items?.properties ?? {}).map(([n, t]) => [n, { type: "array", items: t }]);
|
|
53
|
+
var re = (e) => {
|
|
54
|
+
try {
|
|
55
|
+
return JSON.parse(e);
|
|
56
|
+
} catch {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var J2 = (e) => {
|
|
61
|
+
let n = typeof e == "string" ? re(e) : e;
|
|
62
|
+
if (!(!n || typeof n != "object" || n[I2] !== true))
|
|
63
|
+
return Object.keys(n.properties ?? {}).length > 0 ? n : undefined;
|
|
64
|
+
};
|
|
65
|
+
var ie = (e) => {
|
|
66
|
+
let n = J2(e);
|
|
67
|
+
if (!n)
|
|
68
|
+
return e;
|
|
69
|
+
let t = {};
|
|
70
|
+
for (let p of Object.values(n.properties ?? {}))
|
|
71
|
+
for (let [o, c] of Object.entries(p.properties ?? {})) {
|
|
72
|
+
let d = c[H] === true ? se(c) : [];
|
|
73
|
+
for (let [l, g] of d.length ? d : [[o, c]])
|
|
74
|
+
t[l] ??= g;
|
|
75
|
+
}
|
|
76
|
+
let { definitions: r, $defs: u } = n;
|
|
77
|
+
return { type: "object", properties: t, ...r ? { definitions: r } : {}, ...u ? { $defs: u } : {} };
|
|
78
|
+
};
|
|
79
|
+
var oe = { "invalid-xml": "The rule is not valid XML.", "unsafe-xml": "The rule declares a document type, which is not allowed.", "lossy-xml": "The rule contains comments or processing instructions that cannot be preserved.", "unsupported-version": "The rule uses a DMN version that is not supported.", "migration-failed": "The rule could not be migrated to a supported DMN version.", "unsupported-profile": "The rule uses DMN constructs that are not supported." };
|
|
80
|
+
var N = class extends Error {
|
|
81
|
+
constructor(t) {
|
|
82
|
+
super(oe[t] ?? "The rule could not be read.");
|
|
83
|
+
this.reason = t;
|
|
84
|
+
this.name = "UnreadableDmnError";
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
var W = (e) => e.__$$element === "decision";
|
|
88
|
+
var ae = (e) => e.__$$element === "inputData";
|
|
89
|
+
var A2 = (e) => e.expression?.__$$element === "decisionTable" ? e.expression : undefined;
|
|
90
|
+
var k = (e) => e.expression?.__$$element === "literalExpression" ? e.expression : undefined;
|
|
91
|
+
var C = (e) => !!A2(e) || !!k(e);
|
|
92
|
+
var ue = (e, n, t, r) => ({ name: t, displayName: e["@_label"] || t, ...r.argumentType(...ce(e, n), true), source: `=result.${t}` });
|
|
93
|
+
var ce = (e, n) => n["@_typeRef"] === undefined ? [e.variable?.["@_typeRef"], [e.variable, e]] : [n["@_typeRef"], [n, e]];
|
|
94
|
+
var le = (e, n, t) => ({ name: n, displayName: e["@_name"] || e.variable?.["@_name"] || "", ...t.argumentType(e.variable?.["@_typeRef"], [e.variable, e], false), required: true });
|
|
95
|
+
async function G(e) {
|
|
96
|
+
let [{ importDmnDocument: n }, { outputArgumentName: t, resolvedIdentifier: r }, { aggregateTypeRef: u, isCollectAggregation: p, LIST_HIT_POLICIES: o }, { DmnHitPolicy: c }] = await Promise.all([import("./KieDmnMarshaller-LGE63WDG-j2aa6x0t.js"), import("./DmnFactory-L7MABUC6-2se4hby1.js"), import("./hitPolicyResult-CGCR73CW-g7y41q6z.js"), import("./DmnModelTypes-ATR7FVKZ-as7dzkny.js")]), d = await n(e);
|
|
97
|
+
if (d.status === "error")
|
|
98
|
+
throw new N(d.reason);
|
|
99
|
+
let l = d.document.definitions, g = l.drgElement ?? [], R = g.filter(W), O = g.filter(ae), _ = (s) => r(s.variable?.["@_name"], s["@_name"]), T = pe(l), j = (s) => !s["@_aggregation"] && o.has(s["@_hitPolicy"] ?? c.Unique), P = (s, a, m2) => {
|
|
100
|
+
let f = m2["@_typeRef"] === undefined && a.output?.length === 1 && !j(a) ? s.variable?.["@_typeRef"] : undefined, y = f ?? m2["@_typeRef"], S = f === undefined ? [m2, a, s] : [s.variable, s], w = a["@_aggregation"];
|
|
101
|
+
return a["@_hitPolicy"] === c.Collect && p(w) ? [u(w, { typeRef: y }) ?? "Any", S] : [y, S];
|
|
102
|
+
}, B = (s, a, m2, f) => {
|
|
103
|
+
let y = t({ id: m2["@_id"] ?? "", name: m2["@_name"], label: m2["@_label"] }, f);
|
|
104
|
+
return { name: y, displayName: m2["@_label"] || y, ...T.argumentType(...P(s, a, m2), true), source: `=result.${y}` };
|
|
105
|
+
}, i = (s) => s.map((a) => ({ ...a, type: "jsonSchema", ...Y({ type: "array", items: L(a) }) })), D = (s) => {
|
|
106
|
+
let a = k(s);
|
|
107
|
+
if (a)
|
|
108
|
+
return [ue(s, a, _(s), T)];
|
|
109
|
+
let m2 = A2(s);
|
|
110
|
+
if (!m2)
|
|
111
|
+
return [];
|
|
112
|
+
let f = (m2.output ?? []).map((S, w) => B(s, m2, S, w)), y = s["@_name"];
|
|
113
|
+
return f.length !== 1 || m2.output?.[0]?.["@_name"]?.trim() || !y ? f : [{ ...f[0], name: y, displayName: m2.output?.[0]?.["@_label"] || y, source: `=result.${y}` }];
|
|
114
|
+
}, E = (s) => {
|
|
115
|
+
let a = A2(s);
|
|
116
|
+
return a && j(a) ? i(D(s)) : D(s);
|
|
117
|
+
}, h = (s = () => true) => O.filter(s).map((a) => le(a, _(a), T)), b = (s) => {
|
|
118
|
+
let a = s["@_name"] ?? "", m2 = A2(s), f = D(s), y = !!m2 && j(m2), S = (ee) => Object.fromEntries(ee.map((M) => [M.name, L(M)])), w = y && f.length > 1 ? { [a]: { type: "array", items: { type: "object", properties: S(f) }, [H]: true } } : S(y ? i(f) : f);
|
|
119
|
+
return { name: a, displayName: a, type: "jsonSchema", source: `=result.${a}`, _jsonSchema: { type: "object", properties: w } };
|
|
120
|
+
}, x = R.every((s) => !C(s) || !!s["@_name"]?.trim());
|
|
121
|
+
return { definitions: l, decisions: R, declared: O, identifierOf: _, inputsFor: h, outputsOf: E, toKeyedOutput: b, keyable: x };
|
|
122
|
+
}
|
|
123
|
+
async function me(e, n = false) {
|
|
124
|
+
let { decisions: t, inputsFor: r, outputsOf: u, toKeyedOutput: p, keyable: o } = await G(e), c = t.filter(C), d = n && o && c.length > 0, l = d ? c.map(p) : c.flatMap(u).filter((g, R, O) => O.findIndex((_) => _.name === g.name) === R);
|
|
125
|
+
return { inputs: r(), outputs: l, ...d ? { decisionKeyed: true } : {} };
|
|
126
|
+
}
|
|
127
|
+
var X = (e) => ne(e.foreign ? "Any" : e.baseTypeRef ?? "");
|
|
128
|
+
var z = (e) => {
|
|
129
|
+
let n = e.recursive ? {} : e.components ? { type: "object", properties: Object.fromEntries(e.components.map((t) => [t.name, z(t.type)])) } : $(X(e));
|
|
130
|
+
return e.chain.filter((t) => t.isCollection).reduce((t) => ({ type: "array", items: t }), n);
|
|
131
|
+
};
|
|
132
|
+
function pe(e) {
|
|
133
|
+
let n = { itemDefinitions: A(e), namespace: e["@_namespace"], namespaces: m(e) }, t = (r, u) => J(n, r, I(u));
|
|
134
|
+
return { argumentType: (r, u, p) => {
|
|
135
|
+
let o = t(r, u);
|
|
136
|
+
if (!o.components && !o.isCollection)
|
|
137
|
+
return { type: X(o) };
|
|
138
|
+
let c = z(o);
|
|
139
|
+
return { type: p ? "jsonSchema" : c.type === "array" ? "array" : "object", ...Y(c) };
|
|
140
|
+
} };
|
|
141
|
+
}
|
|
142
|
+
var Q = (e) => e?.startsWith("#") ? e.slice(1) : e || undefined;
|
|
143
|
+
var de = (e, n) => new RegExp(`(^|[^\\w.$])${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}([^\\w$]|$)`).test(e);
|
|
144
|
+
function ye(e, n) {
|
|
145
|
+
let t = new Set([e]), r = [e];
|
|
146
|
+
for (;r.length > 0; ) {
|
|
147
|
+
let u = n.get(r.shift() ?? "");
|
|
148
|
+
if (!u)
|
|
149
|
+
continue;
|
|
150
|
+
let p = [...(u.informationRequirement ?? []).flatMap((o) => [o.requiredInput?.["@_href"], o.requiredDecision?.["@_href"]]), ...(u.knowledgeRequirement ?? []).map((o) => o.requiredKnowledge?.["@_href"])];
|
|
151
|
+
for (let o of p) {
|
|
152
|
+
let c = Q(o);
|
|
153
|
+
!c || t.has(c) || (t.add(c), r.push(c));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return t;
|
|
157
|
+
}
|
|
158
|
+
async function v(e, n = false) {
|
|
159
|
+
let { definitions: t, decisions: r, declared: u, identifierOf: p, inputsFor: o, outputsOf: c, toKeyedOutput: d, keyable: l } = await G(e), g = n && l, R = new Map([...r, ...u].flatMap((i) => i["@_id"] ? [[i["@_id"], i]] : [])), O = new Set(r.flatMap((i) => (i.informationRequirement ?? []).flatMap((D) => {
|
|
160
|
+
let E = Q(D.requiredDecision?.["@_href"]);
|
|
161
|
+
return E ? [E] : [];
|
|
162
|
+
}))), _ = [...r.filter((i) => !O.has(i["@_id"] ?? "")), ...r.filter((i) => O.has(i["@_id"] ?? ""))], T = _.map((i) => {
|
|
163
|
+
let D = ye(i["@_id"] ?? "", R), E = [...D].flatMap((h) => {
|
|
164
|
+
let b = R.get(h);
|
|
165
|
+
if (!b || !W(b))
|
|
166
|
+
return [];
|
|
167
|
+
let x = k(b);
|
|
168
|
+
return x ? [x.text?.__$$text ?? ""] : (A2(b)?.input ?? []).map((s) => s.inputExpression?.text?.__$$text ?? "");
|
|
169
|
+
});
|
|
170
|
+
return (h) => {
|
|
171
|
+
if (D.has(h["@_id"] ?? ""))
|
|
172
|
+
return true;
|
|
173
|
+
let b = p(h);
|
|
174
|
+
return !!b && E.some((x) => de(x, b));
|
|
175
|
+
};
|
|
176
|
+
}), j = new Set(u.filter((i) => T.some((D) => D(i)))), P = _.flatMap((i, D) => {
|
|
177
|
+
if (!C(i))
|
|
178
|
+
return [];
|
|
179
|
+
let E = (h) => T[D](h) || !j.has(h);
|
|
180
|
+
return [{ id: i["@_id"] ?? "", name: i["@_label"] ?? i["@_name"] ?? "", inputs: o(E), outputs: g ? [d(i)] : c(i), ...g ? { decisionKeyed: true } : {} }];
|
|
181
|
+
});
|
|
182
|
+
return !g || P.length < 2 ? P : [{ name: t["@_label"] ?? t["@_name"] ?? "", inputs: o(), outputs: P.flatMap((i) => i.outputs), decisionKeyed: true }, ...P];
|
|
183
|
+
}
|
|
184
|
+
var fe = JSON.stringify({ version: "2.0", resources: [] }, null, 2);
|
|
185
|
+
var De = (e, n) => {
|
|
186
|
+
if (e._jsonSchema) {
|
|
187
|
+
let { $schema: t, ...r } = e._jsonSchema;
|
|
188
|
+
return n ? r : { ...r, title: e.name };
|
|
189
|
+
}
|
|
190
|
+
return e.type === "jsonSchema" ? {} : { ...$(e.type), title: e.name };
|
|
191
|
+
};
|
|
192
|
+
var V = (e, n = false) => e.length === 0 ? { type: "object", properties: {} } : { type: "object", properties: Object.fromEntries(e.map((t) => [t.name, De(t, n)])), required: [] };
|
|
193
|
+
var Z = (e) => typeof e == "string" && e !== "";
|
|
194
|
+
var he = (e) => {
|
|
195
|
+
let n = Array.isArray(e?.entryPoints) ? e.entryPoints : [], t = new Map;
|
|
196
|
+
for (let r of n)
|
|
197
|
+
Z(r?.filePath) && Z(r.uniqueId) && t.set(r.filePath, r.uniqueId);
|
|
198
|
+
return t;
|
|
199
|
+
};
|
|
200
|
+
async function be(e, n, t = false) {
|
|
201
|
+
let r = he(n), u = [], p = [];
|
|
202
|
+
for (let { name: o, contents: c } of e) {
|
|
203
|
+
let d;
|
|
204
|
+
try {
|
|
205
|
+
d = await v(c, t);
|
|
206
|
+
} catch (l) {
|
|
207
|
+
p.push({ name: o, error: l });
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
for (let l of d) {
|
|
211
|
+
let g = l.id ? `/${o}#${l.id}` : `/${o}`;
|
|
212
|
+
u.push({ filePath: g, uniqueId: r.get(g) ?? v4_default(), type: "BusinessRules", ...l.name ? { displayName: l.name } : {}, input: V(l.inputs), output: { ...V(l.outputs, !!l.decisionKeyed), ...l.decisionKeyed ? { [I2]: true } : {} } });
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return { entryPoints: u, entryPointsContent: JSON.stringify({ $schema: "https://cloud.uipath.com/draft/2024-12/entry-point", $id: "entry-points.json", entryPoints: u }, null, 2), bindingContent: fe, unreadable: p, entryPointsChanged: JSON.stringify(n?.entryPoints) !== JSON.stringify(u) };
|
|
216
|
+
}
|
|
217
|
+
export {
|
|
218
|
+
I2 as DECISION_KEYED_SCHEMA_KEY,
|
|
219
|
+
N as UnreadableDmnError,
|
|
220
|
+
J2 as asDecisionKeyedSchema,
|
|
221
|
+
be as buildBusinessRulePackagingFiles,
|
|
222
|
+
ie as flatOutputSchema,
|
|
223
|
+
me as readDmnArguments,
|
|
224
|
+
v as readDmnCallableUnits
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
//# debugId=49EA7ECE5B1686CE64756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -110,7 +110,7 @@ class BusinessRulesTool extends ProjectTool {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
async buildManifestAsync(documents, ruleName) {
|
|
113
|
-
const { buildBusinessRulePackagingFiles } = await import("./index-
|
|
113
|
+
const { buildBusinessRulePackagingFiles } = await import("./index-n20hpx9v.js");
|
|
114
114
|
const { entryPoints, entryPointsContent, unreadable } = await buildBusinessRulePackagingFiles(documents, undefined, true);
|
|
115
115
|
for (const { name, error } of unreadable) {
|
|
116
116
|
this.logger.warn(`Could not read ${name} to derive its entry points: ${error instanceof Error ? error.message : String(error)}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/packager-tool-businessrules",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.205.0-preview.258",
|
|
4
4
|
"description": "UiPath Business Rules tool implementation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"author": "UiPath",
|
|
23
23
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@uipath/solutionpackager-tool-core": "1.
|
|
25
|
+
"@uipath/solutionpackager-tool-core": "1.205.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "8f629ee9fa89abf94f197436a60cb3b9620f8b27"
|
|
28
28
|
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
e,
|
|
3
|
-
i,
|
|
4
|
-
n,
|
|
5
|
-
r
|
|
6
|
-
} from "./index-w023hd2z.js";
|
|
7
|
-
import"./index-80pa5crh.js";
|
|
8
|
-
import"./index-rd3cw6s5.js";
|
|
9
|
-
|
|
10
|
-
// ../../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-A5HCGBDZ.js
|
|
11
|
-
var c = (e2) => e2.includes(":") ? e2.split(":").pop() ?? e2 : e2;
|
|
12
|
-
var D = new Set(["number", "integer", "long", "double", "decimal"]);
|
|
13
|
-
var T = (e2) => D.has(c(e2));
|
|
14
|
-
var s = (e2) => T(e2) ? "number" : c(e2);
|
|
15
|
-
var y = new Set([e.Collect, e.RuleOrder, e.OutputOrder]);
|
|
16
|
-
var R = new Set([e.Priority, e.OutputOrder]);
|
|
17
|
-
var h = (e2) => e2.hitPolicy === e.Collect && e2.aggregation ? e2.aggregation : y.has(e2.hitPolicy) ? "list" : "value";
|
|
18
|
-
var x = (e2) => !!e2 && i.includes(e2);
|
|
19
|
-
var A = (e2, n2) => e2 === n.Sum || e2 === n.Count ? "number" : n2?.typeRef;
|
|
20
|
-
var p = (e2, n2) => n2.typeRef ?? (e2.decision.decisionTable.outputs.length === 1 ? e2.decision.variableTypeRef : undefined);
|
|
21
|
-
var u = (e2, n2) => {
|
|
22
|
-
let t = [], i2 = n2;
|
|
23
|
-
for (;i2 !== undefined; ) {
|
|
24
|
-
let o = c(i2), r2 = e2.itemDefinitions?.find((f) => f.name === o);
|
|
25
|
-
if (!r2 || t.includes(r2))
|
|
26
|
-
break;
|
|
27
|
-
t.push(r2), i2 = r2.typeRef;
|
|
28
|
-
}
|
|
29
|
-
return t;
|
|
30
|
-
};
|
|
31
|
-
var b = (e2, n2) => u(e2, n2).some((t) => t.isCollection);
|
|
32
|
-
var O = (e2) => r.includes(s(e2));
|
|
33
|
-
var I = (e2, n2) => {
|
|
34
|
-
let t = u(e2, n2);
|
|
35
|
-
if (t.some((o) => o.isCollection))
|
|
36
|
-
return false;
|
|
37
|
-
let i2 = t.length === 0 ? n2 : t[t.length - 1].typeRef;
|
|
38
|
-
return i2 === undefined || O(i2) && s(i2) !== "Any";
|
|
39
|
-
};
|
|
40
|
-
var m = (e2, n2) => {
|
|
41
|
-
let t = u(e2, n2), i2 = t[t.length - 1], o = i2 ? i2.typeRef ?? i2.name : n2;
|
|
42
|
-
return o === undefined ? undefined : s(o);
|
|
43
|
-
};
|
|
44
|
-
var P = (e2, n2) => {
|
|
45
|
-
let t = p(e2, n2), i2 = n2.allowedValues?.text.trim() || u(e2, t).find((o) => o.allowedValues?.trim())?.allowedValues;
|
|
46
|
-
return i2 ? { text: i2, typeRef: m(e2, t) } : undefined;
|
|
47
|
-
};
|
|
48
|
-
var M = (e2, n2, t) => {
|
|
49
|
-
if (n2 === n.Count)
|
|
50
|
-
return true;
|
|
51
|
-
let i2 = p(e2, t), o = m(e2, i2);
|
|
52
|
-
return !b(e2, i2) && (!o || ["number", "Any"].includes(s(o)));
|
|
53
|
-
};
|
|
54
|
-
export {
|
|
55
|
-
y as LIST_HIT_POLICIES,
|
|
56
|
-
R as RANKED_HIT_POLICIES,
|
|
57
|
-
A as aggregateTypeRef,
|
|
58
|
-
P as allowedValuesOf,
|
|
59
|
-
m as baseTypeRefOf,
|
|
60
|
-
O as isBuiltInTypeRef,
|
|
61
|
-
x as isCollectAggregation,
|
|
62
|
-
I as isKnownSingleValueTypeRef,
|
|
63
|
-
b as isListTypeRef,
|
|
64
|
-
M as isOutputAggregatable,
|
|
65
|
-
p as outputTypeRefOf,
|
|
66
|
-
h as resultShapeOf
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
//# debugId=4B8D328DE8F32CDF64756E2164756E21
|
package/dist/index-0x5ex1ph.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
v4_default
|
|
3
|
-
} from "./index-tnyxsstx.js";
|
|
4
|
-
import"./index-80pa5crh.js";
|
|
5
|
-
import {
|
|
6
|
-
__require
|
|
7
|
-
} from "./index-rd3cw6s5.js";
|
|
8
|
-
|
|
9
|
-
// ../../../node_modules/@uipath/dmn-editor-utils/dist/entry-points/index.js
|
|
10
|
-
function T(e) {
|
|
11
|
-
switch (e.toLowerCase()) {
|
|
12
|
-
case "boolean":
|
|
13
|
-
return "boolean";
|
|
14
|
-
case "number":
|
|
15
|
-
case "integer":
|
|
16
|
-
case "long":
|
|
17
|
-
case "double":
|
|
18
|
-
case "decimal":
|
|
19
|
-
return "number";
|
|
20
|
-
case "date":
|
|
21
|
-
return "date";
|
|
22
|
-
case "time":
|
|
23
|
-
return "time";
|
|
24
|
-
case "date and time":
|
|
25
|
-
case "datetime":
|
|
26
|
-
return "datetime";
|
|
27
|
-
case "array":
|
|
28
|
-
return "array";
|
|
29
|
-
case "any":
|
|
30
|
-
case "object":
|
|
31
|
-
return "object";
|
|
32
|
-
default:
|
|
33
|
-
return "string";
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
var j = "x-uipath-decision-keyed";
|
|
37
|
-
var L = (e) => {
|
|
38
|
-
try {
|
|
39
|
-
return JSON.parse(e);
|
|
40
|
-
} catch {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
var B = (e) => {
|
|
45
|
-
let t = typeof e == "string" ? L(e) : e;
|
|
46
|
-
if (!(!t || typeof t != "object" || t[j] !== true))
|
|
47
|
-
return Object.keys(t.properties ?? {}).length > 0 ? t : undefined;
|
|
48
|
-
};
|
|
49
|
-
var Y = (e) => {
|
|
50
|
-
let t = B(e);
|
|
51
|
-
if (!t)
|
|
52
|
-
return e;
|
|
53
|
-
let s = {};
|
|
54
|
-
for (let m of Object.values(t.properties ?? {}))
|
|
55
|
-
for (let [a, c] of Object.entries(m.properties ?? {}))
|
|
56
|
-
s[a] ??= c;
|
|
57
|
-
let { definitions: r, $defs: u } = t;
|
|
58
|
-
return { type: "object", properties: s, ...r ? { definitions: r } : {}, ...u ? { $defs: u } : {} };
|
|
59
|
-
};
|
|
60
|
-
var J = { "invalid-xml": "The rule is not valid XML.", "unsafe-xml": "The rule declares a document type, which is not allowed.", "lossy-xml": "The rule contains comments or processing instructions that cannot be preserved.", "unsupported-version": "The rule uses a DMN version that is not supported.", "migration-failed": "The rule could not be migrated to a supported DMN version.", "unsupported-profile": "The rule uses DMN constructs that are not supported." };
|
|
61
|
-
var $ = class extends Error {
|
|
62
|
-
constructor(s) {
|
|
63
|
-
super(J[s] ?? "The rule could not be read.");
|
|
64
|
-
this.reason = s;
|
|
65
|
-
this.name = "UnreadableDmnError";
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
var q = (e) => e.__$$element === "decision";
|
|
69
|
-
var H = (e) => e.__$$element === "inputData";
|
|
70
|
-
var N = (e) => e.expression?.__$$element === "decisionTable" ? e.expression : undefined;
|
|
71
|
-
var A = (e) => e.expression?.__$$element === "literalExpression" ? e.expression : undefined;
|
|
72
|
-
var C = (e) => !!N(e) || !!A(e);
|
|
73
|
-
var W = (e, t) => {
|
|
74
|
-
let s = e.variable?.["@_name"] || e["@_name"] || "";
|
|
75
|
-
return { name: s, displayName: e["@_label"] || s, type: T(t["@_typeRef"] ?? e.variable?.["@_typeRef"] ?? ""), source: `=result.${s}` };
|
|
76
|
-
};
|
|
77
|
-
var G = (e) => ({ name: e.variable?.["@_name"] || e["@_name"] || "", displayName: e["@_name"] || e.variable?.["@_name"] || "", type: T(e.variable?.["@_typeRef"] ?? ""), required: true });
|
|
78
|
-
async function U(e) {
|
|
79
|
-
let [{ importDmnDocument: t }, { outputArgumentName: s }, { aggregateTypeRef: r, isCollectAggregation: u, LIST_HIT_POLICIES: m }, { DmnHitPolicy: a }] = await Promise.all([import("./KieDmnMarshaller-6TTUU5B4-t01scx0r.js"), import("./DmnFactory-VWZOSZHH-66f0ytwb.js"), import("./hitPolicyResult-4WDHTX4A-g09v8d92.js"), import("./DmnModelTypes-ATR7FVKZ-as7dzkny.js")]), c = await t(e);
|
|
80
|
-
if (c.status === "error")
|
|
81
|
-
throw new $(c.reason);
|
|
82
|
-
let y = c.document.definitions, p = y.drgElement ?? [], g = p.filter(q), _ = p.filter(H), E = (n, o) => {
|
|
83
|
-
let l = n["@_aggregation"];
|
|
84
|
-
return n["@_hitPolicy"] === a.Collect && u(l) ? r(l, { typeRef: o["@_typeRef"] }) ?? "Any" : o["@_typeRef"];
|
|
85
|
-
}, R = (n, o, l) => {
|
|
86
|
-
let d = s({ id: o["@_id"] ?? "", name: o["@_name"], label: o["@_label"] }, l);
|
|
87
|
-
return { name: d, displayName: o["@_label"] || d, type: T(E(n, o) ?? ""), source: `=result.${d}` };
|
|
88
|
-
}, O = (n) => {
|
|
89
|
-
let o = A(n);
|
|
90
|
-
if (o)
|
|
91
|
-
return [W(n, o)];
|
|
92
|
-
let l = N(n);
|
|
93
|
-
if (!l)
|
|
94
|
-
return [];
|
|
95
|
-
let d = (l.output ?? []).map((S, P) => R(l, S, P)), D = n["@_name"];
|
|
96
|
-
return d.length !== 1 || l.output?.[0]?.["@_name"]?.trim() || !D ? d : [{ ...d[0], name: D, displayName: l.output?.[0]?.["@_label"] || D, source: `=result.${D}` }];
|
|
97
|
-
}, x = (n = () => true) => _.filter(n).map(G), k = new Map((y.itemDefinition ?? []).map((n) => [n["@_name"], n])), i = (n) => !n["@_aggregation"] && m.has(n["@_hitPolicy"] ?? a.Unique), f = (n) => {
|
|
98
|
-
let o = n["@_name"] ?? "", l = O(n).map((b) => b.name), d = A(n), D = N(n), S = D ? (D.output ?? []).map((b) => I(E(D, b), k)) : [], P;
|
|
99
|
-
return d ? P = [[l[0], I(d["@_typeRef"] ?? n.variable?.["@_typeRef"], k)]] : D && i(D) ? P = S.length > 1 ? [[o, { type: "array", items: { type: "object", properties: Object.fromEntries(l.map((b, w) => [b, S[w]])) } }]] : S.map((b, w) => [l[w], { type: "array", items: b }]) : P = l.map((b, w) => [b, S[w]]), { name: o, displayName: o, type: "jsonSchema", source: `=result.${o}`, _jsonSchema: { type: "object", properties: Object.fromEntries(P) } };
|
|
100
|
-
}, h = g.every((n) => !C(n) || !!n["@_name"]?.trim());
|
|
101
|
-
return { definitions: y, decisions: g, declared: _, inputsFor: x, outputsOf: O, toKeyedOutput: f, keyable: h };
|
|
102
|
-
}
|
|
103
|
-
async function X(e, t = false) {
|
|
104
|
-
let { decisions: s, inputsFor: r, outputsOf: u, toKeyedOutput: m, keyable: a } = await U(e), c = s.filter(C), y = t && a && c.length > 0, p = y ? c.map(m) : c.flatMap(u).filter((g, _, E) => E.findIndex((R) => R.name === g.name) === _);
|
|
105
|
-
return { inputs: r(), outputs: p, ...y ? { decisionKeyed: true } : {} };
|
|
106
|
-
}
|
|
107
|
-
function I(e, t, s = new Set) {
|
|
108
|
-
let r = e && !s.has(e) ? t.get(e) : undefined;
|
|
109
|
-
if (!r)
|
|
110
|
-
return { type: T(e ?? "") };
|
|
111
|
-
let u = new Set(s).add(e ?? ""), m = r.itemComponent ?? [], a = m.length ? { type: "object", properties: Object.fromEntries(m.map((c) => [c["@_name"], I(c.typeRef?.__$$text, t, u)])) } : I(r.typeRef?.__$$text, t, u);
|
|
112
|
-
return r["@_isCollection"] ? { type: "array", items: a } : a;
|
|
113
|
-
}
|
|
114
|
-
var v = (e) => e?.startsWith("#") ? e.slice(1) : e || undefined;
|
|
115
|
-
var z = (e, t) => new RegExp(`(^|[^\\w.$])${t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}([^\\w$]|$)`).test(e);
|
|
116
|
-
function Q(e, t) {
|
|
117
|
-
let s = new Set([e]), r = [e];
|
|
118
|
-
for (;r.length > 0; ) {
|
|
119
|
-
let u = t.get(r.shift() ?? "");
|
|
120
|
-
if (!u)
|
|
121
|
-
continue;
|
|
122
|
-
let m = [...(u.informationRequirement ?? []).flatMap((a) => [a.requiredInput?.["@_href"], a.requiredDecision?.["@_href"]]), ...(u.knowledgeRequirement ?? []).map((a) => a.requiredKnowledge?.["@_href"])];
|
|
123
|
-
for (let a of m) {
|
|
124
|
-
let c = v(a);
|
|
125
|
-
!c || s.has(c) || (s.add(c), r.push(c));
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return s;
|
|
129
|
-
}
|
|
130
|
-
async function M(e, t = false) {
|
|
131
|
-
let { definitions: s, decisions: r, declared: u, inputsFor: m, outputsOf: a, toKeyedOutput: c, keyable: y } = await U(e), p = t && y, g = new Map([...r, ...u].flatMap((i) => i["@_id"] ? [[i["@_id"], i]] : [])), _ = new Set(r.flatMap((i) => (i.informationRequirement ?? []).flatMap((f) => {
|
|
132
|
-
let h = v(f.requiredDecision?.["@_href"]);
|
|
133
|
-
return h ? [h] : [];
|
|
134
|
-
}))), E = [...r.filter((i) => !_.has(i["@_id"] ?? "")), ...r.filter((i) => _.has(i["@_id"] ?? ""))], R = E.map((i) => {
|
|
135
|
-
let f = Q(i["@_id"] ?? "", g), h = [...f].flatMap((n) => {
|
|
136
|
-
let o = g.get(n);
|
|
137
|
-
if (!o || !q(o))
|
|
138
|
-
return [];
|
|
139
|
-
let l = A(o);
|
|
140
|
-
return l ? [l.text?.__$$text ?? ""] : (N(o)?.input ?? []).map((d) => d.inputExpression?.text?.__$$text ?? "");
|
|
141
|
-
});
|
|
142
|
-
return (n) => {
|
|
143
|
-
if (f.has(n["@_id"] ?? ""))
|
|
144
|
-
return true;
|
|
145
|
-
let o = n.variable?.["@_name"] || n["@_name"] || "";
|
|
146
|
-
return !!o && h.some((l) => z(l, o));
|
|
147
|
-
};
|
|
148
|
-
}), O = new Set(u.filter((i) => R.some((f) => f(i)))), x = E.flatMap((i, f) => {
|
|
149
|
-
if (!C(i))
|
|
150
|
-
return [];
|
|
151
|
-
let h = (n) => R[f](n) || !O.has(n);
|
|
152
|
-
return [{ id: i["@_id"] ?? "", name: i["@_label"] ?? i["@_name"] ?? "", inputs: m(h), outputs: p ? [c(i)] : a(i), ...p ? { decisionKeyed: true } : {} }];
|
|
153
|
-
});
|
|
154
|
-
return !p || x.length < 2 ? x : [{ name: s["@_label"] ?? s["@_name"] ?? "", inputs: m(), outputs: x.flatMap((i) => i.outputs), decisionKeyed: true }, ...x];
|
|
155
|
-
}
|
|
156
|
-
var Z = JSON.stringify({ version: "2.0", resources: [] }, null, 2);
|
|
157
|
-
var ee = { date: { type: "string", format: "date" }, datetime: { type: "string", format: "date-time" }, time: { type: "string", format: "time" } };
|
|
158
|
-
var te = (e) => {
|
|
159
|
-
if (e.type === "jsonSchema") {
|
|
160
|
-
let { $schema: t, ...s } = e._jsonSchema ?? {};
|
|
161
|
-
return e._jsonSchema ? s : {};
|
|
162
|
-
}
|
|
163
|
-
return e.type === "array" ? { type: "array", items: {}, title: e.name } : { ...ee[e.type] ?? { type: e.type }, title: e.name };
|
|
164
|
-
};
|
|
165
|
-
var K = (e) => e.length === 0 ? { type: "object", properties: {} } : { type: "object", properties: Object.fromEntries(e.map((t) => [t.name, te(t)])), required: [] };
|
|
166
|
-
var F = (e) => typeof e == "string" && e !== "";
|
|
167
|
-
var ne = (e) => {
|
|
168
|
-
let t = Array.isArray(e?.entryPoints) ? e.entryPoints : [], s = new Map;
|
|
169
|
-
for (let r of t)
|
|
170
|
-
F(r?.filePath) && F(r.uniqueId) && s.set(r.filePath, r.uniqueId);
|
|
171
|
-
return s;
|
|
172
|
-
};
|
|
173
|
-
async function se(e, t, s = false) {
|
|
174
|
-
let r = ne(t), u = [], m = [];
|
|
175
|
-
for (let { name: a, contents: c } of e) {
|
|
176
|
-
let y;
|
|
177
|
-
try {
|
|
178
|
-
y = await M(c, s);
|
|
179
|
-
} catch (p) {
|
|
180
|
-
m.push({ name: a, error: p });
|
|
181
|
-
continue;
|
|
182
|
-
}
|
|
183
|
-
for (let p of y) {
|
|
184
|
-
let g = p.id ? `/${a}#${p.id}` : `/${a}`;
|
|
185
|
-
u.push({ filePath: g, uniqueId: r.get(g) ?? v4_default(), type: "BusinessRules", ...p.name ? { displayName: p.name } : {}, input: K(p.inputs), output: { ...K(p.outputs), ...p.decisionKeyed ? { [j]: true } : {} } });
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return { entryPoints: u, entryPointsContent: JSON.stringify({ $schema: "https://cloud.uipath.com/draft/2024-12/entry-point", $id: "entry-points.json", entryPoints: u }, null, 2), bindingContent: Z, unreadable: m, entryPointsChanged: JSON.stringify(t?.entryPoints) !== JSON.stringify(u) };
|
|
189
|
-
}
|
|
190
|
-
export {
|
|
191
|
-
j as DECISION_KEYED_SCHEMA_KEY,
|
|
192
|
-
$ as UnreadableDmnError,
|
|
193
|
-
B as asDecisionKeyedSchema,
|
|
194
|
-
se as buildBusinessRulePackagingFiles,
|
|
195
|
-
Y as flatOutputSchema,
|
|
196
|
-
X as readDmnArguments,
|
|
197
|
-
M as readDmnCallableUnits
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
//# debugId=9637139E26954FAC64756E2164756E21
|