@lunnoa/client 2.3.0 → 2.5.0
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/README.md +2 -2
- package/dist/cli.js +43 -1
- package/dist/index.cjs +171 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +84 -6
- package/dist/index.d.ts +84 -6
- package/dist/index.js +170 -3
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +43 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +71 -4
- package/dist/react.d.ts +71 -4
- package/dist/react.js +43 -1
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/skills/lunnoa-client/SKILL.md +76 -2
- package/skills/lunnoa-solution-design/SKILL.md +8 -2
package/dist/react.cjs
CHANGED
|
@@ -586,6 +586,33 @@ var ActionsResource = class {
|
|
|
586
586
|
var DEFINE_KINDS = {
|
|
587
587
|
action: "action",
|
|
588
588
|
workflow: "workflow"};
|
|
589
|
+
var PATH_CONDITIONS = [
|
|
590
|
+
"contains",
|
|
591
|
+
"does_not_contain",
|
|
592
|
+
"equals",
|
|
593
|
+
"does_not_equal",
|
|
594
|
+
"exists",
|
|
595
|
+
"does_not_exist",
|
|
596
|
+
"starts_with",
|
|
597
|
+
"ends_with",
|
|
598
|
+
"is_empty",
|
|
599
|
+
"is_not_empty",
|
|
600
|
+
"comes_before",
|
|
601
|
+
"comes_after",
|
|
602
|
+
"is_in_the_past",
|
|
603
|
+
"is_in_the_future",
|
|
604
|
+
"is_true",
|
|
605
|
+
"is_false",
|
|
606
|
+
"is_truthy",
|
|
607
|
+
"is_falsey",
|
|
608
|
+
"is_greater_than",
|
|
609
|
+
"is_less_than",
|
|
610
|
+
"is_greater_than_or_equal_to",
|
|
611
|
+
"is_less_than_or_equal_to",
|
|
612
|
+
"matches_regex",
|
|
613
|
+
"does_not_match_regex"
|
|
614
|
+
];
|
|
615
|
+
new Set(PATH_CONDITIONS);
|
|
589
616
|
function resolveActionAppId(action) {
|
|
590
617
|
if (action.appId?.trim()) {
|
|
591
618
|
return action.appId.trim();
|
|
@@ -1845,12 +1872,19 @@ function stepFromDefinition(step) {
|
|
|
1845
1872
|
...step.name ? { name: step.name } : {}
|
|
1846
1873
|
};
|
|
1847
1874
|
}
|
|
1875
|
+
if (step.paths?.length) {
|
|
1876
|
+
throw new Error(
|
|
1877
|
+
"runs.start runs straight lines only. Deploy workflows with paths, then execute them."
|
|
1878
|
+
);
|
|
1879
|
+
}
|
|
1848
1880
|
const use = step.use;
|
|
1849
1881
|
const input = {
|
|
1850
1882
|
...use.input ?? {},
|
|
1851
1883
|
...step.input ?? {}
|
|
1852
1884
|
};
|
|
1885
|
+
const key = step.key;
|
|
1853
1886
|
return {
|
|
1887
|
+
...key ? { key } : {},
|
|
1854
1888
|
appId: resolveActionAppId(use),
|
|
1855
1889
|
actionId: resolveActionId(use),
|
|
1856
1890
|
...use.connection?.id ? { connectionId: use.connection.id } : {},
|
|
@@ -2066,6 +2100,7 @@ function triggerToUpsertInput(trigger) {
|
|
|
2066
2100
|
function stepToUpsertInput(step) {
|
|
2067
2101
|
const use = step.use;
|
|
2068
2102
|
return {
|
|
2103
|
+
...step.key ? { key: step.key } : {},
|
|
2069
2104
|
appId: resolveActionAppId(use),
|
|
2070
2105
|
actionId: resolveActionId(use),
|
|
2071
2106
|
connectionId: use.connection?.id,
|
|
@@ -2074,7 +2109,14 @@ function stepToUpsertInput(step) {
|
|
|
2074
2109
|
...step.input ?? {}
|
|
2075
2110
|
},
|
|
2076
2111
|
name: step.name ?? use.name,
|
|
2077
|
-
description: use.description
|
|
2112
|
+
description: use.description,
|
|
2113
|
+
...step.paths?.length ? {
|
|
2114
|
+
paths: step.paths.map((path) => ({
|
|
2115
|
+
label: path.label,
|
|
2116
|
+
...path.when ? { when: path.when } : {},
|
|
2117
|
+
steps: path.steps.map(stepToUpsertInput)
|
|
2118
|
+
}))
|
|
2119
|
+
} : {}
|
|
2078
2120
|
};
|
|
2079
2121
|
}
|
|
2080
2122
|
function workflowDefinitionToUpsert(def) {
|