@uipath/maestro-builder-sdk 6.115.0 → 6.117.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/dist/case/external.d.ts +2 -14
- package/dist/case/external.js +3 -24
- package/dist/check.js +2 -2
- package/dist/core/expr-check.d.ts +36 -0
- package/dist/core/expr-check.js +48 -0
- package/dist/core/external-execution.d.ts +38 -0
- package/dist/core/external-execution.js +41 -0
- package/dist/core/refusals.d.ts +1 -0
- package/dist/core/refusals.js +1 -0
- package/dist/flow-expr-check.d.ts +21 -7
- package/dist/flow-expr-check.js +84 -16
- package/dist/nodes/connector/flow/node-type.js +11 -1
- package/dist/registry/library-build/enrich.d.ts +2 -0
- package/dist/registry/library-build/enrich.js +5 -1
- package/dist/registry/prepare/messages.d.ts +13 -0
- package/dist/registry/prepare/messages.js +21 -0
- package/dist/registry/prepare/pipeline.js +12 -3
- package/package.json +2 -2
package/dist/case/external.d.ts
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { ResolvedConnector } from '../core/library.js';
|
|
11
11
|
import type { ExternalEventPair, ExternalExecutionMode } from './case-sdk.js';
|
|
12
|
+
import { isExternalEventMode, isExternalExecutionMode, libraryExecution } from '../core/external-execution.js';
|
|
13
|
+
export { isExternalEventMode, isExternalExecutionMode, libraryExecution };
|
|
12
14
|
/**
|
|
13
15
|
* The context rows `serialize` writes on an external task: the set the Case
|
|
14
16
|
* Designer saves for a sync object (`uip`'s
|
|
@@ -27,8 +29,6 @@ export declare const EXTERNAL_TASK_CONTEXT: readonly string[];
|
|
|
27
29
|
export declare const EXTERNAL_TASK_EVENT_CONTEXT: readonly string[];
|
|
28
30
|
/** Check's and compile's code for {@link externalEventRefusal}. */
|
|
29
31
|
export declare const EXTERNAL_TASK_EVENT = "EXTERNAL_TASK_EVENT";
|
|
30
|
-
/** The event modes Integration Service reports for an object's events. */
|
|
31
|
-
export declare function isExternalEventMode(value: unknown): value is ExternalEventPair['mode'];
|
|
32
32
|
/**
|
|
33
33
|
* Why this task's event pair cannot be written, or `undefined`.
|
|
34
34
|
*
|
|
@@ -45,8 +45,6 @@ export declare function isExternalEventMode(value: unknown): value is ExternalEv
|
|
|
45
45
|
* @returns The refusal, or `undefined`.
|
|
46
46
|
*/
|
|
47
47
|
export declare function externalEventRefusal(owner: string, mode: ExternalExecutionMode, event: unknown): string | undefined;
|
|
48
|
-
/** The execution types an external task accepts: the values Integration Service reports. */
|
|
49
|
-
export declare function isExternalExecutionMode(value: unknown): value is ExternalExecutionMode;
|
|
50
48
|
/**
|
|
51
49
|
* The `data.serviceType` the Case Designer saves for an external task of this
|
|
52
50
|
* execution type. Studio Web runs `hybrid` as `async` (`determineActualIntsvcType`),
|
|
@@ -69,16 +67,6 @@ export type ExternalExecution = {
|
|
|
69
67
|
code: string;
|
|
70
68
|
message: string;
|
|
71
69
|
};
|
|
72
|
-
/**
|
|
73
|
-
* The execution facts the connector library records for the object
|
|
74
|
-
* (`operation.executionType` and `operation.executionEvent`, from
|
|
75
|
-
* `registry build-library` / `registry prepare`, #1369). A value the SDK does
|
|
76
|
-
* not know is ignored, as if it were absent.
|
|
77
|
-
*/
|
|
78
|
-
export declare function libraryExecution(operation: unknown): {
|
|
79
|
-
mode?: ExternalExecutionMode;
|
|
80
|
-
event?: ExternalEventPair;
|
|
81
|
-
};
|
|
82
70
|
/**
|
|
83
71
|
* The mode and event an external task is written with: what the author passed,
|
|
84
72
|
* else what the connector library records for the object. `check` and
|
package/dist/case/external.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { CASE_FORMAT_PROFILE } from './format-profile.js';
|
|
2
|
+
import { isExternalEventMode, isExternalExecutionMode, libraryExecution } from '../core/external-execution.js';
|
|
3
|
+
// Shared with Flow and BPMN, which read the same library record.
|
|
4
|
+
export { isExternalEventMode, isExternalExecutionMode, libraryExecution };
|
|
2
5
|
/**
|
|
3
6
|
* The context rows `serialize` writes on an external task: the set the Case
|
|
4
7
|
* Designer saves for a sync object (`uip`'s
|
|
@@ -20,10 +23,6 @@ export const EXTERNAL_TASK_CONTEXT = [
|
|
|
20
23
|
export const EXTERNAL_TASK_EVENT_CONTEXT = ['operation', 'eventMode'];
|
|
21
24
|
/** Check's and compile's code for {@link externalEventRefusal}. */
|
|
22
25
|
export const EXTERNAL_TASK_EVENT = 'EXTERNAL_TASK_EVENT';
|
|
23
|
-
/** The event modes Integration Service reports for an object's events. */
|
|
24
|
-
export function isExternalEventMode(value) {
|
|
25
|
-
return value === 'polling' || value === 'webhooks';
|
|
26
|
-
}
|
|
27
26
|
/**
|
|
28
27
|
* Why this task's event pair cannot be written, or `undefined`.
|
|
29
28
|
*
|
|
@@ -60,10 +59,6 @@ export function externalEventRefusal(owner, mode, event) {
|
|
|
60
59
|
return `${owner} event.mode must be "polling" or "webhooks"; got ${JSON.stringify(pair.mode)}.`;
|
|
61
60
|
return undefined;
|
|
62
61
|
}
|
|
63
|
-
/** The execution types an external task accepts: the values Integration Service reports. */
|
|
64
|
-
export function isExternalExecutionMode(value) {
|
|
65
|
-
return value === 'sync' || value === 'async' || value === 'hybrid';
|
|
66
|
-
}
|
|
67
62
|
/**
|
|
68
63
|
* The `data.serviceType` the Case Designer saves for an external task of this
|
|
69
64
|
* execution type. Studio Web runs `hybrid` as `async` (`determineActualIntsvcType`),
|
|
@@ -82,22 +77,6 @@ export function externalServiceType(kind, mode) {
|
|
|
82
77
|
}
|
|
83
78
|
/** Check's and compile's code when an authored `mode` disagrees with the library. */
|
|
84
79
|
export const EXTERNAL_TASK_MODE_MISMATCH = 'EXTERNAL_TASK_MODE_MISMATCH';
|
|
85
|
-
/**
|
|
86
|
-
* The execution facts the connector library records for the object
|
|
87
|
-
* (`operation.executionType` and `operation.executionEvent`, from
|
|
88
|
-
* `registry build-library` / `registry prepare`, #1369). A value the SDK does
|
|
89
|
-
* not know is ignored, as if it were absent.
|
|
90
|
-
*/
|
|
91
|
-
export function libraryExecution(operation) {
|
|
92
|
-
const op = (operation ?? {});
|
|
93
|
-
const mode = isExternalExecutionMode(op.executionType) ? op.executionType : undefined;
|
|
94
|
-
const raw = op.executionEvent;
|
|
95
|
-
const event = mode !== undefined && mode !== 'sync' && typeof raw?.operation === 'string' && raw.operation
|
|
96
|
-
&& isExternalEventMode(raw.mode)
|
|
97
|
-
? { operation: raw.operation, mode: raw.mode }
|
|
98
|
-
: undefined;
|
|
99
|
-
return { ...(mode ? { mode } : {}), ...(event ? { event } : {}) };
|
|
100
|
-
}
|
|
101
80
|
/**
|
|
102
81
|
* The mode and event an external task is written with: what the author passed,
|
|
103
82
|
* else what the connector library records for the object. `check` and
|
package/dist/check.js
CHANGED
|
@@ -6,7 +6,7 @@ import { FlowNode } from './core/node-classes.js';
|
|
|
6
6
|
import { definitionHasErrorPort } from './core/error-port.js';
|
|
7
7
|
import { bundledDefinition, resolveContributionDefinition, serialize } from './serialize.js';
|
|
8
8
|
import { checkEventResolution, checkEventSubscription, eventParamsFor, } from './core/event-checks.js';
|
|
9
|
-
import { checkCookedEscapes, checkFlowExpressions, literalExprShape, literalLooksLikeExpr } from './flow-expr-check.js';
|
|
9
|
+
import { checkCookedEscapes, checkFlowExpressions, checkVarsOnlyInQuotes, literalExprShape, literalLooksLikeExpr } from './flow-expr-check.js';
|
|
10
10
|
import { FLOW_EXPR_DIALECT, checkBindingLabels, checkConnectorLookups as coreCheckConnectorLookups, checkConnectorResources as coreCheckConnectorResources, checkConnectorSchema as coreCheckConnectorSchema, } from './core/connector-checks.js';
|
|
11
11
|
import { nearestName } from './core/edit-distance.js';
|
|
12
12
|
import { escapeRegExp } from './core/escape-regexp.js';
|
|
@@ -49,7 +49,7 @@ export function checkCompiled(built, opts = {}) {
|
|
|
49
49
|
const diags = checkFlow(built, [], opts);
|
|
50
50
|
// Once, from the top: the walk reaches child flows itself, so running it per
|
|
51
51
|
// `checkFlow` would report a child's escape twice.
|
|
52
|
-
for (const d of checkCookedEscapes(built)) {
|
|
52
|
+
for (const d of [...checkCookedEscapes(built), ...checkVarsOnlyInQuotes(built)]) {
|
|
53
53
|
diags.push({
|
|
54
54
|
level: d.level, code: d.code, message: `In ${d.where}: ${d.message}`,
|
|
55
55
|
...(d.step !== undefined ? { step: d.step } : {}),
|
|
@@ -114,6 +114,42 @@ export interface ExprScope {
|
|
|
114
114
|
* `namespace` defaults to `$vars` (Flow); Case passes `case`.
|
|
115
115
|
*/
|
|
116
116
|
export declare function extractRefs(expr: string, namespace?: string): ExprRef[];
|
|
117
|
+
/** A quoted mention of the namespace inside an expression that reads none (`quotedOnlyMentions`). */
|
|
118
|
+
export interface QuotedMention {
|
|
119
|
+
/** The string literal as written, quotes included: `'$vars.start.output.topic'`. */
|
|
120
|
+
literal: string;
|
|
121
|
+
/** The text inside the quotes. */
|
|
122
|
+
text: string;
|
|
123
|
+
/**
|
|
124
|
+
* Where `literal` sits in the expression (`expr.slice(start, end) === literal`), for a
|
|
125
|
+
* whole string: a quoted string or a template with no parts. Absent for a piece of a
|
|
126
|
+
* template with parts (head, middle, tail): its token carries the `` ` ``/`${`/`}`
|
|
127
|
+
* delimiters, so there is no quoted reference to unquote in place.
|
|
128
|
+
*/
|
|
129
|
+
start?: number;
|
|
130
|
+
end?: number;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* The string literals that mention `<namespace>.` (or `<namespace>[`) in an
|
|
134
|
+
* expression that reads no variable, or `undefined` when the expression reads
|
|
135
|
+
* one, mentions the namespace in no string, or does not parse (that is
|
|
136
|
+
* EXPR_SYNTAX's). A read is the namespace itself or any other `$`-prefixed root
|
|
137
|
+
* (`$metadata.instanceId`): an expression that reads `$metadata` is not a
|
|
138
|
+
* constant, whatever its quoted text says.
|
|
139
|
+
*
|
|
140
|
+
* For instance `'"' + '$vars.start.output.topic' + '"'` reads no variable: the
|
|
141
|
+
* reference sits inside quotes, so the expression is the string constant
|
|
142
|
+
* `"$vars.start.output.topic"` on every run. `$vars.a.output + ' ($vars.b)'`
|
|
143
|
+
* reads `$vars.a`, so it is not reported: a mention in text beside a real read
|
|
144
|
+
* may well be deliberate.
|
|
145
|
+
*
|
|
146
|
+
* Parsed, not pattern-matched: a read is an identifier token in code (a member
|
|
147
|
+
* chain, `Object.keys($vars)`, a `${...}` part of a template), and a mention is
|
|
148
|
+
* a string or template text piece that contains the namespace. So an escaped
|
|
149
|
+
* quote, a comment, a regular expression and a string inside a template part
|
|
150
|
+
* are each read for what they are.
|
|
151
|
+
*/
|
|
152
|
+
export declare function quotedOnlyMentions(expr: string, namespace?: string): QuotedMention[] | undefined;
|
|
117
153
|
/**
|
|
118
154
|
* First-level check of ONE expression: every reference's root must resolve (or, for a
|
|
119
155
|
* root declared with a dot in its name, its leading segments; see `unresolvedDottedName`).
|
package/dist/core/expr-check.js
CHANGED
|
@@ -225,6 +225,54 @@ export function extractRefs(expr, namespace = DEFAULT_NAMESPACE) {
|
|
|
225
225
|
}
|
|
226
226
|
return refs;
|
|
227
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* The string literals that mention `<namespace>.` (or `<namespace>[`) in an
|
|
230
|
+
* expression that reads no variable, or `undefined` when the expression reads
|
|
231
|
+
* one, mentions the namespace in no string, or does not parse (that is
|
|
232
|
+
* EXPR_SYNTAX's). A read is the namespace itself or any other `$`-prefixed root
|
|
233
|
+
* (`$metadata.instanceId`): an expression that reads `$metadata` is not a
|
|
234
|
+
* constant, whatever its quoted text says.
|
|
235
|
+
*
|
|
236
|
+
* For instance `'"' + '$vars.start.output.topic' + '"'` reads no variable: the
|
|
237
|
+
* reference sits inside quotes, so the expression is the string constant
|
|
238
|
+
* `"$vars.start.output.topic"` on every run. `$vars.a.output + ' ($vars.b)'`
|
|
239
|
+
* reads `$vars.a`, so it is not reported: a mention in text beside a real read
|
|
240
|
+
* may well be deliberate.
|
|
241
|
+
*
|
|
242
|
+
* Parsed, not pattern-matched: a read is an identifier token in code (a member
|
|
243
|
+
* chain, `Object.keys($vars)`, a `${...}` part of a template), and a mention is
|
|
244
|
+
* a string or template text piece that contains the namespace. So an escaped
|
|
245
|
+
* quote, a comment, a regular expression and a string inside a template part
|
|
246
|
+
* are each read for what they are.
|
|
247
|
+
*/
|
|
248
|
+
export function quotedOnlyMentions(expr, namespace = DEFAULT_NAMESPACE) {
|
|
249
|
+
if (!expr.includes(namespace))
|
|
250
|
+
return undefined;
|
|
251
|
+
const ts = typescript();
|
|
252
|
+
const { source, problems } = parseExpression(expr);
|
|
253
|
+
if (problems.length)
|
|
254
|
+
return undefined;
|
|
255
|
+
const mention = new RegExp(`${escapeRegExp(namespace)}\\s*[.[]`);
|
|
256
|
+
let reads = 0;
|
|
257
|
+
const found = [];
|
|
258
|
+
const visit = (node) => {
|
|
259
|
+
if (ts.isIdentifier(node) && (node.text === namespace || node.text.startsWith('$')))
|
|
260
|
+
reads++;
|
|
261
|
+
else if (node.kind >= ts.SyntaxKind.FirstLiteralToken && node.kind <= ts.SyntaxKind.LastTemplateToken
|
|
262
|
+
&& node.kind !== ts.SyntaxKind.RegularExpressionLiteral) {
|
|
263
|
+
const text = node.text;
|
|
264
|
+
// The source is `(${expr}\n)`: one character before the expression starts.
|
|
265
|
+
const start = node.getStart(source) - 1;
|
|
266
|
+
const whole = node.kind === ts.SyntaxKind.StringLiteral || node.kind === ts.SyntaxKind.NoSubstitutionTemplateLiteral;
|
|
267
|
+
const literal = expr.slice(start, node.end - 1);
|
|
268
|
+
if (mention.test(text))
|
|
269
|
+
found.push(whole ? { literal, text, start, end: node.end - 1 } : { literal, text });
|
|
270
|
+
}
|
|
271
|
+
ts.forEachChild(node, visit);
|
|
272
|
+
};
|
|
273
|
+
visit(source);
|
|
274
|
+
return reads === 0 && found.length ? found : undefined;
|
|
275
|
+
}
|
|
228
276
|
/** True when `a` and `b` are equal or one edit (insert/delete/substitute) apart. */
|
|
229
277
|
function editDistanceLE1(a, b) {
|
|
230
278
|
if (a === b)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/external-execution — how an external agent or automation runs, as the
|
|
3
|
+
* connector library records it.
|
|
4
|
+
*
|
|
5
|
+
* Integration Service keeps it on the connector object, not on the registry
|
|
6
|
+
* node: `executionType` (`sync`, `async` or `hybrid`) and, for an `async` or
|
|
7
|
+
* `hybrid` object, the event it answers with. `registry build-library` and
|
|
8
|
+
* `registry prepare` copy both from `uip is resources describe` onto the
|
|
9
|
+
* entry's `operation` (`registry/library-build/enrich.ts`, #1369). Case and Flow
|
|
10
|
+
* read them through {@link libraryExecution}.
|
|
11
|
+
*/
|
|
12
|
+
/** An external object's execution type, as Integration Service reports it. */
|
|
13
|
+
export type ExecutionMode = 'sync' | 'async' | 'hybrid';
|
|
14
|
+
/** The event an `async` or `hybrid` object answers with: its operation and how it is received. */
|
|
15
|
+
export interface ExecutionEvent {
|
|
16
|
+
operation: string;
|
|
17
|
+
mode: 'polling' | 'webhooks';
|
|
18
|
+
}
|
|
19
|
+
/** The event modes Integration Service reports for an object's events. */
|
|
20
|
+
export declare function isExternalEventMode(value: unknown): value is ExecutionEvent['mode'];
|
|
21
|
+
/** The execution types an external object can have: the values Integration Service reports. */
|
|
22
|
+
export declare function isExternalExecutionMode(value: unknown): value is ExecutionMode;
|
|
23
|
+
/**
|
|
24
|
+
* The execution facts the connector library records for the object
|
|
25
|
+
* (`operation.executionType` and `operation.executionEvent`, from
|
|
26
|
+
* `registry build-library` / `registry prepare`, #1369). A value the SDK does
|
|
27
|
+
* not know is ignored, as if it were absent. A `sync` object has no event.
|
|
28
|
+
*
|
|
29
|
+
* For example `{ executionType: 'hybrid', executionEvent: { operation: 'TRIGGER_CREATED', mode: 'polling' } }`
|
|
30
|
+
* reads as `{ mode: 'hybrid', event: { operation: 'TRIGGER_CREATED', mode: 'polling' } }`.
|
|
31
|
+
*
|
|
32
|
+
* @param operation - A library entry's `operation`.
|
|
33
|
+
* @returns The recorded mode and event; `{}` when the library records none.
|
|
34
|
+
*/
|
|
35
|
+
export declare function libraryExecution(operation: unknown): {
|
|
36
|
+
mode?: ExecutionMode;
|
|
37
|
+
event?: ExecutionEvent;
|
|
38
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/external-execution — how an external agent or automation runs, as the
|
|
3
|
+
* connector library records it.
|
|
4
|
+
*
|
|
5
|
+
* Integration Service keeps it on the connector object, not on the registry
|
|
6
|
+
* node: `executionType` (`sync`, `async` or `hybrid`) and, for an `async` or
|
|
7
|
+
* `hybrid` object, the event it answers with. `registry build-library` and
|
|
8
|
+
* `registry prepare` copy both from `uip is resources describe` onto the
|
|
9
|
+
* entry's `operation` (`registry/library-build/enrich.ts`, #1369). Case and Flow
|
|
10
|
+
* read them through {@link libraryExecution}.
|
|
11
|
+
*/
|
|
12
|
+
/** The event modes Integration Service reports for an object's events. */
|
|
13
|
+
export function isExternalEventMode(value) {
|
|
14
|
+
return value === 'polling' || value === 'webhooks';
|
|
15
|
+
}
|
|
16
|
+
/** The execution types an external object can have: the values Integration Service reports. */
|
|
17
|
+
export function isExternalExecutionMode(value) {
|
|
18
|
+
return value === 'sync' || value === 'async' || value === 'hybrid';
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The execution facts the connector library records for the object
|
|
22
|
+
* (`operation.executionType` and `operation.executionEvent`, from
|
|
23
|
+
* `registry build-library` / `registry prepare`, #1369). A value the SDK does
|
|
24
|
+
* not know is ignored, as if it were absent. A `sync` object has no event.
|
|
25
|
+
*
|
|
26
|
+
* For example `{ executionType: 'hybrid', executionEvent: { operation: 'TRIGGER_CREATED', mode: 'polling' } }`
|
|
27
|
+
* reads as `{ mode: 'hybrid', event: { operation: 'TRIGGER_CREATED', mode: 'polling' } }`.
|
|
28
|
+
*
|
|
29
|
+
* @param operation - A library entry's `operation`.
|
|
30
|
+
* @returns The recorded mode and event; `{}` when the library records none.
|
|
31
|
+
*/
|
|
32
|
+
export function libraryExecution(operation) {
|
|
33
|
+
const op = (operation ?? {});
|
|
34
|
+
const mode = isExternalExecutionMode(op.executionType) ? op.executionType : undefined;
|
|
35
|
+
const raw = op.executionEvent;
|
|
36
|
+
const event = mode !== undefined && mode !== 'sync' && typeof raw?.operation === 'string' && raw.operation
|
|
37
|
+
&& isExternalEventMode(raw.mode)
|
|
38
|
+
? { operation: raw.operation, mode: raw.mode }
|
|
39
|
+
: undefined;
|
|
40
|
+
return { ...(mode ? { mode } : {}), ...(event ? { event } : {}) };
|
|
41
|
+
}
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -351,6 +351,7 @@ export declare const REFUSALS: {
|
|
|
351
351
|
readonly EXPR_BARE_VAR_REF: "lint";
|
|
352
352
|
readonly EXPR_SYNTAX: "lowering";
|
|
353
353
|
readonly EXPR_UNDECLARED_REF: "lint";
|
|
354
|
+
readonly EXPR_VARS_ONLY_IN_QUOTES: "lint";
|
|
354
355
|
readonly EXTERNAL_TASK_CONNECTION: "lowering";
|
|
355
356
|
readonly EXTERNAL_TASK_DESCRIPTOR: "lint";
|
|
356
357
|
readonly EXTERNAL_TASK_DESCRIPTOR_CONTRACT: "lowering";
|
package/dist/core/refusals.js
CHANGED
|
@@ -425,6 +425,7 @@ export const REFUSALS = {
|
|
|
425
425
|
EXPR_BARE_VAR_REF: 'lint',
|
|
426
426
|
EXPR_SYNTAX: 'lowering',
|
|
427
427
|
EXPR_UNDECLARED_REF: 'lint',
|
|
428
|
+
EXPR_VARS_ONLY_IN_QUOTES: 'lint',
|
|
428
429
|
EXTERNAL_TASK_CONNECTION: 'lowering',
|
|
429
430
|
EXTERNAL_TASK_DESCRIPTOR: 'lint',
|
|
430
431
|
EXTERNAL_TASK_DESCRIPTOR_CONTRACT: 'lowering',
|
|
@@ -23,19 +23,33 @@ export declare function checkFlowExpressions(built: BuiltFlow): LocatedDiagnosti
|
|
|
23
23
|
* Every `js` template escape that changed what its expression means
|
|
24
24
|
* (JS_ESCAPE_COOKED), each stamped with where it sits.
|
|
25
25
|
*
|
|
26
|
-
* WHY A GENERIC WALK. The two per-site walks (`walk` above and `check.ts`'s
|
|
27
|
-
* expression collection) each enumerate the positions an expression can sit in,
|
|
28
|
-
* and neither covers all of them — HTTP branch conditions, trigger filters and
|
|
29
|
-
* error-handler bodies each live in only one, or none. This warning is about the
|
|
30
|
-
* `Expr` itself, not about the field it fills, so it visits every `Expr` reachable
|
|
31
|
-
* from the built flow, child flows included: a new position cannot be missed.
|
|
32
|
-
*
|
|
33
26
|
* Only `meaning` effects are reported here. An escape that breaks the parse is
|
|
34
27
|
* named by EXPR_SYNTAX, which the serializer refuses.
|
|
35
28
|
*/
|
|
36
29
|
export declare function checkCookedEscapes(built: BuiltFlow): (LocatedDiagnostic & {
|
|
37
30
|
step?: string;
|
|
38
31
|
})[];
|
|
32
|
+
/**
|
|
33
|
+
* EXPR_VARS_ONLY_IN_QUOTES (warning, #1971): an expression whose every `$vars`
|
|
34
|
+
* mention sits inside a string literal, so it reads no variable and evaluates
|
|
35
|
+
* to the same constant on every run. For instance
|
|
36
|
+
* js`'"' + '$vars.start.output.topic' + '"'` is the text
|
|
37
|
+
* `"$vars.start.output.topic"`, not the topic: the reference was quoted.
|
|
38
|
+
*
|
|
39
|
+
* Only an expression that reads NO variable is reported (`quotedOnlyMentions`):
|
|
40
|
+
* `$vars.a.output + ' ($vars.b)'` and `$metadata.instanceId + ' $vars.b'` each
|
|
41
|
+
* read one, and a mention beside a real read may be deliberate text. A `lit(...)` is not an
|
|
42
|
+
* expression, and a script body (`code`) or a prompt is a plain string, so
|
|
43
|
+
* none of them is read here.
|
|
44
|
+
*
|
|
45
|
+
* The suggestion is the expression with each quoted whole reference unquoted
|
|
46
|
+
* (`'$vars.start.output.topic'` → `$vars.start.output.topic`), when every
|
|
47
|
+
* mention is one; a mention inside longer text (`'Hi $vars.x'`) has no
|
|
48
|
+
* mechanical fix, so the message points at `tmpl`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function checkVarsOnlyInQuotes(built: BuiltFlow): (LocatedDiagnostic & {
|
|
51
|
+
step?: string;
|
|
52
|
+
})[];
|
|
39
53
|
/**
|
|
40
54
|
* How a plain string looks like an expression: `text` = sent as written,
|
|
41
55
|
* `template` = interpolated through `{{ … }}`, `wire` = evaluated because it
|
package/dist/flow-expr-check.js
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* script body's `$vars.*` reads are `check.ts`'s UNKNOWN_REF.
|
|
33
33
|
*/
|
|
34
34
|
import { Expr, cookedEscapesOf } from './core/expr.js';
|
|
35
|
-
import { checkExpression, cookedEscapeDiagnostics, extractRefs } from './core/expr-check.js';
|
|
35
|
+
import { checkExpression, cookedEscapeDiagnostics, extractRefs, quotedOnlyMentions } from './core/expr-check.js';
|
|
36
36
|
import { refusalClass } from './core/refusals.js';
|
|
37
37
|
import { stepDeclaredVariables } from './flow-step-variables.js';
|
|
38
38
|
import { CompileRefusal } from './core/compile-refusal.js';
|
|
@@ -222,34 +222,31 @@ export function checkFlowExpressions(built) {
|
|
|
222
222
|
return out;
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
225
|
+
* Visit every `Expr` reachable from the built flow, child flows included, with
|
|
226
|
+
* where it sits.
|
|
227
227
|
*
|
|
228
228
|
* WHY A GENERIC WALK. The two per-site walks (`walk` above and `check.ts`'s
|
|
229
229
|
* expression collection) each enumerate the positions an expression can sit in,
|
|
230
230
|
* and neither covers all of them — HTTP branch conditions, trigger filters and
|
|
231
|
-
* error-handler bodies each live in only one, or none.
|
|
232
|
-
*
|
|
233
|
-
*
|
|
231
|
+
* error-handler bodies each live in only one, or none. A rule about the `Expr`
|
|
232
|
+
* itself, not about the field it fills (JS_ESCAPE_COOKED,
|
|
233
|
+
* EXPR_VARS_ONLY_IN_QUOTES), visits every `Expr` this way: a new position
|
|
234
|
+
* cannot be missed. Run it once, from the top: it reaches child flows itself.
|
|
234
235
|
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
236
|
+
* `onExpr` gets an `Expr`, or a value of another SDK copy that carries cooked
|
|
237
|
+
* escapes (`cookedEscapesOf`); the walk does not descend into either.
|
|
237
238
|
*/
|
|
238
|
-
|
|
239
|
-
const out = [];
|
|
239
|
+
function visitExprs(built, onExpr) {
|
|
240
240
|
const seen = new WeakSet();
|
|
241
241
|
const root = built;
|
|
242
242
|
const visit = (val, at) => {
|
|
243
243
|
if (val === null || typeof val !== 'object')
|
|
244
244
|
return;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
for (const d of cookedEscapeDiagnostics(val.js, escapes)) {
|
|
248
|
-
out.push({ ...d, where: at.where, ...(at.step !== undefined ? { step: at.step } : {}) });
|
|
249
|
-
}
|
|
245
|
+
if (val instanceof Expr || cookedEscapesOf(val).length) {
|
|
246
|
+
onExpr(val, at);
|
|
250
247
|
return;
|
|
251
248
|
}
|
|
252
|
-
if (
|
|
249
|
+
if (seen.has(val))
|
|
253
250
|
return;
|
|
254
251
|
seen.add(val);
|
|
255
252
|
if (Array.isArray(val)) {
|
|
@@ -278,6 +275,77 @@ export function checkCookedEscapes(built) {
|
|
|
278
275
|
visit(v, at);
|
|
279
276
|
};
|
|
280
277
|
visit(built, { where: 'flow', prefix: '' });
|
|
278
|
+
}
|
|
279
|
+
/** A finding stamped with where its `Expr` sits (`visitExprs`). */
|
|
280
|
+
function located(d, at) {
|
|
281
|
+
return { ...d, where: at.where, ...(at.step !== undefined ? { step: at.step } : {}) };
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Every `js` template escape that changed what its expression means
|
|
285
|
+
* (JS_ESCAPE_COOKED), each stamped with where it sits.
|
|
286
|
+
*
|
|
287
|
+
* Only `meaning` effects are reported here. An escape that breaks the parse is
|
|
288
|
+
* named by EXPR_SYNTAX, which the serializer refuses.
|
|
289
|
+
*/
|
|
290
|
+
export function checkCookedEscapes(built) {
|
|
291
|
+
const out = [];
|
|
292
|
+
visitExprs(built, (val, at) => {
|
|
293
|
+
const escapes = cookedEscapesOf(val);
|
|
294
|
+
if (!escapes.length)
|
|
295
|
+
return;
|
|
296
|
+
for (const d of cookedEscapeDiagnostics(val.js, escapes))
|
|
297
|
+
out.push(located(d, at));
|
|
298
|
+
});
|
|
299
|
+
return out;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* EXPR_VARS_ONLY_IN_QUOTES (warning, #1971): an expression whose every `$vars`
|
|
303
|
+
* mention sits inside a string literal, so it reads no variable and evaluates
|
|
304
|
+
* to the same constant on every run. For instance
|
|
305
|
+
* js`'"' + '$vars.start.output.topic' + '"'` is the text
|
|
306
|
+
* `"$vars.start.output.topic"`, not the topic: the reference was quoted.
|
|
307
|
+
*
|
|
308
|
+
* Only an expression that reads NO variable is reported (`quotedOnlyMentions`):
|
|
309
|
+
* `$vars.a.output + ' ($vars.b)'` and `$metadata.instanceId + ' $vars.b'` each
|
|
310
|
+
* read one, and a mention beside a real read may be deliberate text. A `lit(...)` is not an
|
|
311
|
+
* expression, and a script body (`code`) or a prompt is a plain string, so
|
|
312
|
+
* none of them is read here.
|
|
313
|
+
*
|
|
314
|
+
* The suggestion is the expression with each quoted whole reference unquoted
|
|
315
|
+
* (`'$vars.start.output.topic'` → `$vars.start.output.topic`), when every
|
|
316
|
+
* mention is one; a mention inside longer text (`'Hi $vars.x'`) has no
|
|
317
|
+
* mechanical fix, so the message points at `tmpl`.
|
|
318
|
+
*/
|
|
319
|
+
export function checkVarsOnlyInQuotes(built) {
|
|
320
|
+
const out = [];
|
|
321
|
+
visitExprs(built, (val, at) => {
|
|
322
|
+
if (!(val instanceof Expr) || val.literal)
|
|
323
|
+
return;
|
|
324
|
+
const mentions = quotedOnlyMentions(val.js);
|
|
325
|
+
if (!mentions)
|
|
326
|
+
return;
|
|
327
|
+
const wholeRef = /^\$vars(?:\.[A-Za-z_$][\w$]*|\[\d+\])+$/;
|
|
328
|
+
// Spliced by offset, last mention first, so an earlier splice never moves a later one
|
|
329
|
+
// and a mention's text is never matched elsewhere in the expression.
|
|
330
|
+
let fixed = val.js;
|
|
331
|
+
for (const m of [...mentions].sort((a, b) => (b.start ?? -1) - (a.start ?? -1))) {
|
|
332
|
+
// A template piece has no offsets (`QuotedMention.start`): nothing to unquote in place.
|
|
333
|
+
if (m.start === undefined || m.end === undefined || !wholeRef.test(m.text)) {
|
|
334
|
+
fixed = undefined;
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
fixed = fixed.slice(0, m.start) + m.text + fixed.slice(m.end);
|
|
338
|
+
}
|
|
339
|
+
const quoted = mentions.map((m) => m.literal).join(', ');
|
|
340
|
+
out.push(located({
|
|
341
|
+
level: 'warning',
|
|
342
|
+
code: 'EXPR_VARS_ONLY_IN_QUOTES',
|
|
343
|
+
message: `the expression \`${val.js.length > 120 ? `${val.js.slice(0, 117)}...` : val.js}\` mentions $vars only inside quotes (${quoted}), `
|
|
344
|
+
+ 'so it reads no variable: the quoted text is a string constant, and the expression has the same value on every run. '
|
|
345
|
+
+ 'Take the reference out of the quotes: js`\'"\' + ${input(\'topic\')} + \'"\'`, or tmpl`"${input(\'topic\')}"` for text around it.',
|
|
346
|
+
...(fixed !== undefined ? { suggestion: fixed } : {}),
|
|
347
|
+
}, at));
|
|
348
|
+
});
|
|
281
349
|
return out;
|
|
282
350
|
}
|
|
283
351
|
// ─── LITERAL_LOOKS_LIKE_EXPR (#1970) ────────────────────────────────────────
|
|
@@ -3,6 +3,7 @@ import { BindingRefusal, bindingMissingMessage, missingBindingLabels } from '../
|
|
|
3
3
|
import { PULL_COMMAND, prepareCommand } from '../../../core/cli-spelling.js';
|
|
4
4
|
import { carriedConnector, carriedDefinitionMismatch, carriedOperationOf, carriedOperationRefusal, } from '../../../core/carried-connector-operation.js';
|
|
5
5
|
import { buildConfiguration, readConfigurationIdentity } from '../../../core/connector-configuration.js';
|
|
6
|
+
import { libraryExecution } from '../../../core/external-execution.js';
|
|
6
7
|
import { CONNECTOR_INPUT_MISSING, FLOW_EXPR_DIALECT, buildConnectorInputs, replayInputsOf, transportHttpMethod } from '../../../core/connector-inputs.js';
|
|
7
8
|
import { ConnectorResolveError } from '../../../core/connector-resolve-error.js';
|
|
8
9
|
import { definitionHasErrorPort } from '../../../core/error-port.js';
|
|
@@ -240,6 +241,13 @@ function serializeConnector(spec, ctx) {
|
|
|
240
241
|
}
|
|
241
242
|
})();
|
|
242
243
|
const replayInputs = replayInputsOf(connectorInputs);
|
|
244
|
+
// An external agent or automation runs the way its connector object says
|
|
245
|
+
// (#1988). The Flow runtime reads it off the detail: `executionType` picks
|
|
246
|
+
// the sync or async service type, and an async / hybrid object's event is
|
|
247
|
+
// what the node waits on. `uip maestro flow nodes configure` writes the same
|
|
248
|
+
// three keys. Without them a sync agent runs as the registry's
|
|
249
|
+
// `Intsvc.AsyncAgentExecution` and waits for an event that never comes.
|
|
250
|
+
const execution = libraryExecution(rc.entry?.operation);
|
|
243
251
|
const detail = {
|
|
244
252
|
connector: rc.connectorKey,
|
|
245
253
|
method: transportHttpMethod(rc.httpMethod),
|
|
@@ -252,7 +260,9 @@ function serializeConnector(spec, ctx) {
|
|
|
252
260
|
inputMetadata: {},
|
|
253
261
|
errorState: { hasError: false },
|
|
254
262
|
telemetryData: { connectorKey: rc.connectorKey, connectorName: rc.connectorName },
|
|
255
|
-
configuration: buildConfiguration(rc.entry, rc.version, replayInputs, ctx.nodeId),
|
|
263
|
+
configuration: buildConfiguration(rc.entry, rc.version, replayInputs, ctx.nodeId, execution.mode ?? null),
|
|
264
|
+
...(execution.mode ? { executionType: execution.mode } : {}),
|
|
265
|
+
...(execution.event ? { eventMode: execution.event.mode, eventType: execution.event.operation } : {}),
|
|
256
266
|
...(rc.activityTypeId ? { uiPathActivityTypeId: rc.activityTypeId } : {}),
|
|
257
267
|
...(conn ? { connectionId: conn, connectionResourceId: conn } : {}),
|
|
258
268
|
...(folder ? { connectionFolderKey: folder } : {}),
|
|
@@ -19,6 +19,8 @@ export declare function discoverOperationName(ctx: BuildContext, entry: LibraryE
|
|
|
19
19
|
* payload; `objectDisplayName` and `display.operationLabel` fill gaps only.
|
|
20
20
|
*/
|
|
21
21
|
export declare function applyDescribe(entry: LibraryEntry, data: unknown): LibraryEntry;
|
|
22
|
+
/** Whether `operation` is an external agent's or automation's: an `AgentExecution` / `ProcessExecution` subtype. */
|
|
23
|
+
export declare function isExternalOperation(operation: unknown): boolean;
|
|
22
24
|
/**
|
|
23
25
|
* Record an external agent's or automation's execution facts on its operation,
|
|
24
26
|
* from the describe payload (#1369, #1387).
|
|
@@ -95,6 +95,10 @@ export function applyDescribe(entry, data) {
|
|
|
95
95
|
}
|
|
96
96
|
/** The operation subtypes Case's and BPMN's external agent / workflow tasks run. */
|
|
97
97
|
const EXTERNAL_SUBTYPES = new Set(["AgentExecution", "ProcessExecution"]);
|
|
98
|
+
/** Whether `operation` is an external agent's or automation's: an `AgentExecution` / `ProcessExecution` subtype. */
|
|
99
|
+
export function isExternalOperation(operation) {
|
|
100
|
+
return EXTERNAL_SUBTYPES.has(String(get(operation, "subType") ?? ""));
|
|
101
|
+
}
|
|
98
102
|
/** The execution types Integration Service reports, as Case and BPMN read them. */
|
|
99
103
|
const EXECUTION_TYPES = new Set(["sync", "async", "hybrid"]);
|
|
100
104
|
/**
|
|
@@ -116,7 +120,7 @@ const EXECUTION_TYPES = new Set(["sync", "async", "hybrid"]);
|
|
|
116
120
|
* leaves the entry as it was, so an older build stays byte-identical.
|
|
117
121
|
*/
|
|
118
122
|
export function applyExternalExecution(operation, data) {
|
|
119
|
-
if (!
|
|
123
|
+
if (!isExternalOperation(operation))
|
|
120
124
|
return;
|
|
121
125
|
// Stored only as one of the three values Case and BPMN read, lowercased: a
|
|
122
126
|
// `Hybrid` kept verbatim would be ignored downstream and read as "no record".
|
|
@@ -169,6 +169,19 @@ export declare function probeSkippedReason(key: string): string;
|
|
|
169
169
|
export declare function catalogRefreshPartialLine(reason: string): string;
|
|
170
170
|
/** The warning when that pull failed; the fallback continues against the local copy. */
|
|
171
171
|
export declare function catalogRefreshFailedLine(reason: string): string;
|
|
172
|
+
/**
|
|
173
|
+
* The warning when an external agent's or automation's describe reported no
|
|
174
|
+
* execution type (#1988). A `uip` older than uip#5702 does not report it, and
|
|
175
|
+
* without it the compiled Flow node keeps the registry's service type, so a
|
|
176
|
+
* sync agent runs as async and waits for an event that never comes.
|
|
177
|
+
*/
|
|
178
|
+
export declare function unrecordedExecutionLine(nodeType: string): string;
|
|
179
|
+
/**
|
|
180
|
+
* The warning when an `async` or `hybrid` external object's describe names no
|
|
181
|
+
* event it answers with: the compiled node has nothing to wait on. The CLI's
|
|
182
|
+
* `nodes configure` warns the same (`externalExecutionWarning`).
|
|
183
|
+
*/
|
|
184
|
+
export declare function missingExecutionEventLine(nodeType: string, mode: string): string;
|
|
172
185
|
/** The note when the author's `--action` spelling was not the entry's id. */
|
|
173
186
|
export declare function actionCanonicalizedLine(given: string, actionId: string): string;
|
|
174
187
|
/**
|
|
@@ -377,6 +377,27 @@ export function catalogRefreshPartialLine(reason) {
|
|
|
377
377
|
export function catalogRefreshFailedLine(reason) {
|
|
378
378
|
return `${PREFIX}registry pull --force failed (${reason}); continuing with the local catalog copy, which may be stale.`;
|
|
379
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* The warning when an external agent's or automation's describe reported no
|
|
382
|
+
* execution type (#1988). A `uip` older than uip#5702 does not report it, and
|
|
383
|
+
* without it the compiled Flow node keeps the registry's service type, so a
|
|
384
|
+
* sync agent runs as async and waits for an event that never comes.
|
|
385
|
+
*/
|
|
386
|
+
export function unrecordedExecutionLine(nodeType) {
|
|
387
|
+
return (`${PREFIX}WARN: Integration Service reported no execution type (sync, async or hybrid) for the external ` +
|
|
388
|
+
`operation ${nodeType}, so the compiled node keeps the registry's service type and may wait on an event that ` +
|
|
389
|
+
"never comes. A `uip` older than the release with ExecutionType in `uip is resources describe` does not " +
|
|
390
|
+
"report it: run `uip update` and prepare again.");
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* The warning when an `async` or `hybrid` external object's describe names no
|
|
394
|
+
* event it answers with: the compiled node has nothing to wait on. The CLI's
|
|
395
|
+
* `nodes configure` warns the same (`externalExecutionWarning`).
|
|
396
|
+
*/
|
|
397
|
+
export function missingExecutionEventLine(nodeType, mode) {
|
|
398
|
+
return (`${PREFIX}WARN: the external operation ${nodeType} runs ${mode}, but Integration Service names no event it ` +
|
|
399
|
+
"answers with, so the compiled node has nothing to wait on and may never finish.");
|
|
400
|
+
}
|
|
380
401
|
/** The note when the author's `--action` spelling was not the entry's id. */
|
|
381
402
|
export function actionCanonicalizedLine(given, actionId) {
|
|
382
403
|
return ` action: "${given}" is Integration Service activity ${actionId}; the entry is written under that id.`;
|
|
@@ -31,7 +31,8 @@ import { PACKAGE_NAME } from "../../package-name.js";
|
|
|
31
31
|
import { afterLast } from "../compat/pystr.js";
|
|
32
32
|
import { extractCanonical, isHttpPassthrough, nodeOf } from "../library-build/canonical.js";
|
|
33
33
|
import { createBuildContext, isResourcesList, registryProbe } from "../library-build/context.js";
|
|
34
|
-
import { enrichEntry } from "../library-build/enrich.js";
|
|
34
|
+
import { enrichEntry, isExternalOperation } from "../library-build/enrich.js";
|
|
35
|
+
import { libraryExecution } from "../../core/external-execution.js";
|
|
35
36
|
import { expandGenericForConnector, genericTemplatesByOp } from "../library-build/generic-expand.js";
|
|
36
37
|
import { planLibrary } from "../library-build/plan.js";
|
|
37
38
|
import { MemoryResponseCache } from "../uip/response-cache.js";
|
|
@@ -43,7 +44,7 @@ import { prepareEvent } from "./event.js";
|
|
|
43
44
|
import { integrationServiceEntry } from "./integration-service.js";
|
|
44
45
|
import { descriptorUsage } from "./handoff.js";
|
|
45
46
|
import { ResolutionsExhausted, allParentsResolved, resolvedParentValues, writeResolutions } from "./ledger.js";
|
|
46
|
-
import { PrepareRefusal, ambiguousLabelsMessage, connectionChoiceLine, bindingsLine, bpmnConnectorUsageLines, candidateLabel, connectionLine, describeNextLine, generatedModulesLine, genericActionNeedsObjectMessage, inputFieldNote, flagDiffersFromSourceLine, keptSchemaMessage, labelTakenMessage, lookupVocabularyLines, missingGenericSchemaMessage, missingParentsNote, nextLine, noCanonicalEntryMessage, objectFlagsOnlyForGenericMessage, objectNoteLine, objectRecordedLine, parentFieldNamesMismatchMessage, parentOnlyMessage, prefixed, preparedFromIntegrationServiceLine, actionCanonicalizedLine, catalogRefreshFailedLine, catalogRefreshPartialLine, probeSkippedReason, refreshingCatalogLine, rememberedAbsenceLine, preparedSummaryLine, rejectedParentFieldsMessage, rerunAgainstLine, resolvedParentsNote, registryGetFailedMessage, sharedLabelMessage, sourceLabelSuffix, tsNote, partlyUnreadableLabelLine, unreadableLabelLine, unresolvedOperationMessage, planRowReplacedLine, } from "./messages.js";
|
|
47
|
+
import { PrepareRefusal, ambiguousLabelsMessage, connectionChoiceLine, bindingsLine, bpmnConnectorUsageLines, candidateLabel, connectionLine, describeNextLine, generatedModulesLine, genericActionNeedsObjectMessage, inputFieldNote, flagDiffersFromSourceLine, keptSchemaMessage, labelTakenMessage, lookupVocabularyLines, missingGenericSchemaMessage, missingParentsNote, nextLine, noCanonicalEntryMessage, objectFlagsOnlyForGenericMessage, objectNoteLine, objectRecordedLine, parentFieldNamesMismatchMessage, parentOnlyMessage, prefixed, preparedFromIntegrationServiceLine, actionCanonicalizedLine, catalogRefreshFailedLine, catalogRefreshPartialLine, probeSkippedReason, refreshingCatalogLine, rememberedAbsenceLine, preparedSummaryLine, rejectedParentFieldsMessage, rerunAgainstLine, resolvedParentsNote, registryGetFailedMessage, sharedLabelMessage, sourceLabelSuffix, tsNote, partlyUnreadableLabelLine, unreadableLabelLine, missingExecutionEventLine, unrecordedExecutionLine, unresolvedOperationMessage, planRowReplacedLine, } from "./messages.js";
|
|
47
48
|
import { ObjectMatchRefusal, RESOLUTIONS_FILENAME, matchObject, recordObjectResolution } from "./objects.js";
|
|
48
49
|
import { countInputFields, keepPreparedSchema, lookupSpecsFromOverlay, mergeFilesInto, parentFields as overlayParentFields, schemaActionParents, } from "./overlay.js";
|
|
49
50
|
import { declaredParents, objectActionRequest, objectActionSpecs, parseFields } from "./parents.js";
|
|
@@ -519,8 +520,16 @@ async function prepareOnConnection(options, ports, connected, registryRefresh) {
|
|
|
519
520
|
if (objectName || options.allObjects)
|
|
520
521
|
throw new PrepareRefusal(objectFlagsOnlyForGenericMessage(), "OBJECT_NOT_GENERIC");
|
|
521
522
|
// An Integration Service entry IS the describe; there is nothing to enrich it with.
|
|
522
|
-
if (fromIntegrationService === undefined)
|
|
523
|
+
if (fromIntegrationService === undefined) {
|
|
523
524
|
entry = await enrichEntry(ctx, entry); // full schema via --connection-id
|
|
525
|
+
if (isExternalOperation(entry.operation)) {
|
|
526
|
+
const { mode, event } = libraryExecution(entry.operation);
|
|
527
|
+
if (mode === undefined)
|
|
528
|
+
warn(unrecordedExecutionLine(entry.nodeType));
|
|
529
|
+
else if (mode !== "sync" && event === undefined)
|
|
530
|
+
warn(missingExecutionEventLine(entry.nodeType, mode));
|
|
531
|
+
}
|
|
532
|
+
}
|
|
524
533
|
preparedEntries = [entry];
|
|
525
534
|
}
|
|
526
535
|
const entryNodeType = entry.nodeType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.117.0",
|
|
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",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"@types/node": "^22.7.0",
|
|
125
125
|
"esbuild": "^0.28.1"
|
|
126
126
|
},
|
|
127
|
-
"gitref": "
|
|
127
|
+
"gitref": "1b64d4c5c62d489c3bb736aa9a47860615d43fa0"
|
|
128
128
|
}
|