@uipath/maestro-builder-sdk 6.17.5 → 6.17.6
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/decompile.js +35 -46
- package/package.json +2 -2
package/dist/decompile.js
CHANGED
|
@@ -1959,45 +1959,44 @@ function emitVariables(e, depth, flow, imp, epTriggers = new Set(), shared) {
|
|
|
1959
1959
|
}
|
|
1960
1960
|
}
|
|
1961
1961
|
// ─── Trigger ──────────────────────────────────────────────────────────────────
|
|
1962
|
+
/**
|
|
1963
|
+
* The trigger factory call for a root trigger node, or `undefined` for a type
|
|
1964
|
+
* this file cannot read back. Both the default root (`.trigger(...)`) and every
|
|
1965
|
+
* extra root (`.entryPoint(id, ...)`) read it.
|
|
1966
|
+
*/
|
|
1967
|
+
function triggerFactory(t, imp, inputNames) {
|
|
1968
|
+
// Decompiled source spells the default `manual()` out on purpose: it is more
|
|
1969
|
+
// explicit than hand-authored source so the node's exact definition version
|
|
1970
|
+
// survives recompilation (design §5.3).
|
|
1971
|
+
if (t.type === T.triggerManual)
|
|
1972
|
+
return `${imp.use('manual')}()`;
|
|
1973
|
+
if (t.type === T.triggerScheduled)
|
|
1974
|
+
return `${imp.use('scheduled')}(${opts([['every', str(scheduleEvery(t))]])})`;
|
|
1975
|
+
// The form schema is DERIVED from the root's inputs at compile time, so
|
|
1976
|
+
// nothing of it needs recovering — the factory takes no arguments.
|
|
1977
|
+
if (t.type === T.triggerForm)
|
|
1978
|
+
return `${imp.use('formTrigger')}()`;
|
|
1979
|
+
if (t.type === T.triggerConversation)
|
|
1980
|
+
return `${imp.use('conversationTrigger')}()`;
|
|
1981
|
+
if (t.type === T.triggerVoice)
|
|
1982
|
+
return `${imp.use('voiceTrigger')}()`;
|
|
1983
|
+
// A connector EVENT trigger — the same subscription body as a mid-flow wait.
|
|
1984
|
+
const sub = emitEventSubscription(t, imp, inputNames);
|
|
1985
|
+
if (sub !== undefined)
|
|
1986
|
+
return `${imp.use('onEvent')}(${sub})`;
|
|
1987
|
+
return undefined;
|
|
1988
|
+
}
|
|
1962
1989
|
function emitTrigger(e, depth, trigger, imp, o, inputNames = new Set()) {
|
|
1963
1990
|
// The trigger's id is addressable — a flow's inputs are published as its
|
|
1964
1991
|
// output — so a renamed one has to survive the round trip. `start` is the
|
|
1965
1992
|
// default and stays implicit.
|
|
1966
1993
|
if (trigger.id && trigger.id !== DEFAULT_TRIGGER_ID)
|
|
1967
1994
|
e.line(depth, `.triggerId(${str(trigger.id)})`);
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
// survives recompilation (design §5.3).
|
|
1972
|
-
e.line(depth, `.trigger(${imp.use('manual')}()${triggerOptsArg(trigger)})`);
|
|
1973
|
-
return;
|
|
1974
|
-
}
|
|
1975
|
-
if (trigger.type === T.triggerScheduled) {
|
|
1976
|
-
e.line(depth, `.trigger(${imp.use('scheduled')}(${opts([['every', str(scheduleEvery(trigger))]])})${triggerOptsArg(trigger)})`);
|
|
1977
|
-
return;
|
|
1978
|
-
}
|
|
1979
|
-
if (trigger.type === T.triggerForm) {
|
|
1980
|
-
// The schema is DERIVED from the flow's inputs at compile time, so nothing
|
|
1981
|
-
// of it needs recovering — the factory takes no arguments.
|
|
1982
|
-
e.line(depth, `.trigger(${imp.use('formTrigger')}()${triggerOptsArg(trigger)})`);
|
|
1995
|
+
const factory = triggerFactory(trigger, imp, inputNames);
|
|
1996
|
+
if (factory !== undefined) {
|
|
1997
|
+
e.line(depth, `.trigger(${factory}${triggerOptsArg(trigger)})`);
|
|
1983
1998
|
return;
|
|
1984
1999
|
}
|
|
1985
|
-
if (trigger.type === T.triggerConversation) {
|
|
1986
|
-
e.line(depth, `.trigger(${imp.use('conversationTrigger')}()${triggerOptsArg(trigger)})`);
|
|
1987
|
-
return;
|
|
1988
|
-
}
|
|
1989
|
-
if (trigger.type === T.triggerVoice) {
|
|
1990
|
-
e.line(depth, `.trigger(${imp.use('voiceTrigger')}()${triggerOptsArg(trigger)})`);
|
|
1991
|
-
return;
|
|
1992
|
-
}
|
|
1993
|
-
// A connector EVENT trigger — the same subscription body as a mid-flow wait.
|
|
1994
|
-
{
|
|
1995
|
-
const sub = emitEventSubscription(trigger, imp, inputNames);
|
|
1996
|
-
if (sub !== undefined) {
|
|
1997
|
-
e.line(depth, `.trigger(${imp.use('onEvent')}(${sub})${triggerOptsArg(trigger)})`);
|
|
1998
|
-
return;
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
2000
|
if (o.bestEffort === false) {
|
|
2002
2001
|
throw new Error(`decompile: unsupported trigger type "${trigger.type}".`);
|
|
2003
2002
|
}
|
|
@@ -2930,21 +2929,11 @@ function scheduleEvery(t) {
|
|
|
2930
2929
|
}
|
|
2931
2930
|
/** One `.entryPoint(id, trigger, { inputs, version }, prefix)` segment for a non-default root. */
|
|
2932
2931
|
function entryPointSeg(t, scope, ipdom, ctx) {
|
|
2933
|
-
const
|
|
2934
|
-
|
|
2935
|
-
: t.type
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
? `${ctx.imp.use('conversationTrigger')}()`
|
|
2939
|
-
: t.type === T.triggerVoice
|
|
2940
|
-
? `${ctx.imp.use('voiceTrigger')}()`
|
|
2941
|
-
: t.type === T.triggerManual
|
|
2942
|
-
? `${ctx.imp.use('manual')}()`
|
|
2943
|
-
: (() => {
|
|
2944
|
-
if (ctx.o.bestEffort === false)
|
|
2945
|
-
throw new Error(`decompile: unsupported entry-point trigger type "${t.type}".`);
|
|
2946
|
-
return `${ctx.imp.use('manual')}() /* TODO: unsupported trigger type ${commentText(t.type)} */`;
|
|
2947
|
-
})();
|
|
2932
|
+
const known = triggerFactory(t, ctx.imp, ctx.inputNames);
|
|
2933
|
+
if (known === undefined && ctx.o.bestEffort === false) {
|
|
2934
|
+
throw new Error(`decompile: unsupported entry-point trigger type "${t.type}".`);
|
|
2935
|
+
}
|
|
2936
|
+
const factory = known ?? `${ctx.imp.use('manual')}() /* TODO: unsupported trigger type ${commentText(t.type)} */`;
|
|
2948
2937
|
const scoped = readFlowGlobals(ctx.flow.variables, runStrict)
|
|
2949
2938
|
.filter((g) => g.direction === 'in' && g.triggerNodeId === t.id);
|
|
2950
2939
|
const optParts = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.17.
|
|
3
|
+
"version": "6.17.6",
|
|
4
4
|
"description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.uipath.com/maestro",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"@types/node": "^22.7.0",
|
|
93
93
|
"esbuild": "^0.28.1"
|
|
94
94
|
},
|
|
95
|
-
"gitref": "
|
|
95
|
+
"gitref": "ff4d7f22f587af64ccdf9c28c70572e7bab2852a"
|
|
96
96
|
}
|