@uipath/maestro-builder-sdk 6.120.20 → 6.120.21
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/api-index.md +73 -73
- package/dist/api-members.md +335 -335
- package/dist/bpmn/bpmn-expr-check.d.ts +12 -0
- package/dist/bpmn/bpmn-expr-check.js +155 -0
- package/dist/bpmn/bpmn-sdk.d.ts +10 -5
- package/dist/bpmn/bpmn-sdk.js +3 -3
- package/dist/bpmn/check-baseline.js +6 -1
- package/dist/bpmn/check.js +4 -3
- package/dist/bpmn-api.md +1 -1
- package/dist/core/refusals.d.ts +2 -0
- package/dist/core/refusals.js +2 -0
- package/package.json +2 -2
|
@@ -43,8 +43,20 @@ export interface BpmnLocatedDiagnostic extends ExprDiagnostic {
|
|
|
43
43
|
/** The field's path inside that element — see {@link BpmnExprField.path}. */
|
|
44
44
|
path?: string;
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Codes that advise how NEW expression text should be written. `check --baseline` drops
|
|
48
|
+
* them on an element the edit did not change (check-baseline.ts): an untouched
|
|
49
|
+
* expression is the original's, and an edit is not asked to rewrite it.
|
|
50
|
+
*/
|
|
51
|
+
export declare const AUTHORING_ADVICE_CODES: ReadonlySet<string>;
|
|
46
52
|
/** Every first-level expression problem in a built BPMN process, stamped with its location. */
|
|
47
53
|
export declare function checkBpmnExpressions(built: BuiltBpmn): BpmnLocatedDiagnostic[];
|
|
54
|
+
/**
|
|
55
|
+
* Every expression in a built BPMN process that the platform reads as C# while the
|
|
56
|
+
* author most likely meant JavaScript (#2137): `EXPR_BARE_PREFIX` and
|
|
57
|
+
* `EXPR_BARE_PREFIX_JS_SYNTAX`, on the same fields as {@link checkBpmnExpressions}.
|
|
58
|
+
*/
|
|
59
|
+
export declare function checkBpmnExpressionLanguage(built: BuiltBpmn): BpmnLocatedDiagnostic[];
|
|
48
60
|
/**
|
|
49
61
|
* Was thrown by `BpmnBuilder.build()` when the first-level expression check found an
|
|
50
62
|
* undeclared `vars.<name>` reference. `message` lists every problem; `diagnostics`
|
|
@@ -126,6 +126,144 @@ function argumentMessage(root, { decl, scope }) {
|
|
|
126
126
|
`'BPMN.Variables', outputRows: [{ name: ${tsLiteral(decl.name)}, type: ${tsLiteral(type)}, ` +
|
|
127
127
|
`source: ${tsLiteral(`=vars.${decl.id}`)}, var: ${tsLiteral(local)} }] } })\`, then read \`=vars.${local}\`.`);
|
|
128
128
|
}
|
|
129
|
+
// Expression language (#2137): Studio Web and the Maestro runtime read a bare `=` as
|
|
130
|
+
// C# and only `=js:` as JavaScript. compile keeps the authored text, since a bare `=`
|
|
131
|
+
// may be deliberate C#, so check reports it instead.
|
|
132
|
+
/** A value the platform reads as a JavaScript expression. */
|
|
133
|
+
const JS_EXPR_PREFIX = '=js:';
|
|
134
|
+
/** Another `=<marker>:` prefix (`=jsonString:` in node metadata) — not a bare-`=` expression. */
|
|
135
|
+
const OTHER_PREFIX = /^=[A-Za-z]+:/;
|
|
136
|
+
/**
|
|
137
|
+
* A Data Fabric lookup, which the runtime resolves itself rather than as C# or JavaScript:
|
|
138
|
+
* `=datafabric[bindings.<entity>?folderPath=bindings.<folder>]["qes:{...}"]` or
|
|
139
|
+
* `=datafabric.<Entity>["qes:{...}"]` (Studio Web `DataFabricEditorUtils`). Its query
|
|
140
|
+
* tail is JSON with unescaped quotes, so it is not an expression in either language.
|
|
141
|
+
*/
|
|
142
|
+
const DATA_FABRIC_LOOKUP = /^=\s*datafabric\s*[.[]/;
|
|
143
|
+
/**
|
|
144
|
+
* One dotted / indexed path (`vars.a.b`, `vars.items[0].id`, `response`, `out_合計`): the
|
|
145
|
+
* same read in C# and JavaScript, both of which take Unicode letters in a name.
|
|
146
|
+
*/
|
|
147
|
+
const PLAIN_PATH = /^[\p{L}_$][\p{L}\p{N}_$]*(?:\s*\.\s*[\p{L}_$][\p{L}\p{N}_$]*|\s*\[\s*(?:\d+|"[^"\\]*")\s*\])*$/u;
|
|
148
|
+
/** A literal that is the same value in C# and JavaScript. */
|
|
149
|
+
const PLAIN_LITERAL = /^(?:-?\d+(?:\.\d+)?|true|false|null|"[^"\\]*")$/;
|
|
150
|
+
/**
|
|
151
|
+
* JavaScript that C# (DynamicExpresso) does not have, each with how the message names it.
|
|
152
|
+
* `definite: false` marks one that is also legal C# in some processes (a JSON property
|
|
153
|
+
* named `length`), so it is a warning, not an error.
|
|
154
|
+
*/
|
|
155
|
+
const JS_ONLY = [
|
|
156
|
+
{ re: /`/, named: 'a template literal', definite: true },
|
|
157
|
+
{ re: /===|!==/, named: '`===` / `!==`', definite: true },
|
|
158
|
+
{ re: /\bJSON\s*\./, named: '`JSON`', definite: true },
|
|
159
|
+
{ re: /\.\s*[a-z_$][\w$]*\s*\(/, named: 'a lower-case (JavaScript) method call', definite: true },
|
|
160
|
+
{ re: /\bundefined\b/, named: '`undefined`', definite: true },
|
|
161
|
+
{ re: /\bfunction\b/, named: '`function`', definite: true },
|
|
162
|
+
{ re: /\.\s*length\b(?!\s*\()/, named: '`.length`', definite: false },
|
|
163
|
+
];
|
|
164
|
+
/**
|
|
165
|
+
* C# that JavaScript does not have: a .NET member call (`.Contains(`, `.ToString(`), a
|
|
166
|
+
* collection's `.Count` / `.Length`, a .NET type (`String.IsNullOrEmpty`), an interpolated
|
|
167
|
+
* or verbatim string. A body with one is C#, so `=js:` + the same text is no fix.
|
|
168
|
+
*/
|
|
169
|
+
const CSHARP_ONLY = [
|
|
170
|
+
/\.\s*[A-Z]\w*\s*\(/,
|
|
171
|
+
/\.\s*(?:Count|Length)\b/,
|
|
172
|
+
/\b(?:String|string|Convert|DateTime|TimeSpan|Guid|Math|double|int|long|decimal|bool|Enumerable|Newtonsoft)\s*\./,
|
|
173
|
+
/[$@]"/,
|
|
174
|
+
];
|
|
175
|
+
/**
|
|
176
|
+
* `body` with the contents of every string literal emptied, so text inside one
|
|
177
|
+
* (`"a.length"`, `"`"`) is not read as code. Reads C# regular strings and chars
|
|
178
|
+
* (backslash escapes, also JavaScript's `'...'`), C# verbatim strings (`@"..."`, `$@"..."`,
|
|
179
|
+
* where `""` is the only escape) and JavaScript template literals. A template literal
|
|
180
|
+
* keeps its backticks, so it is still reported as JavaScript, and a verbatim string its
|
|
181
|
+
* `@`, so it is still read as C#.
|
|
182
|
+
*
|
|
183
|
+
* `undefined` when `body` does not read as an expression in either language: a string
|
|
184
|
+
* that never closes, or one followed directly by a word or another quote (`"a"b`).
|
|
185
|
+
*/
|
|
186
|
+
function maskStrings(body) {
|
|
187
|
+
let out = '';
|
|
188
|
+
let i = 0;
|
|
189
|
+
while (i < body.length) {
|
|
190
|
+
const c = body[i];
|
|
191
|
+
const verbatim = /^(?:@\$?|\$@)"/.exec(body.slice(i, i + 3));
|
|
192
|
+
if (verbatim || c === '"' || c === "'" || c === '`') {
|
|
193
|
+
const quote = verbatim ? '"' : c;
|
|
194
|
+
i += verbatim ? verbatim[0].length : 1;
|
|
195
|
+
if (verbatim)
|
|
196
|
+
while (i < body.length && !(body[i] === '"' && body[i + 1] !== '"'))
|
|
197
|
+
i += body[i] === '"' ? 2 : 1;
|
|
198
|
+
else
|
|
199
|
+
while (i < body.length && body[i] !== quote)
|
|
200
|
+
i += body[i] === '\\' ? 2 : 1;
|
|
201
|
+
if (i >= body.length || /[\w$"'`]/.test(body[i + 1] ?? ''))
|
|
202
|
+
return undefined;
|
|
203
|
+
// A verbatim string keeps its `@`/`$@`, so CSHARP_ONLY still sees it is C#.
|
|
204
|
+
out += `${verbatim ? verbatim[0].slice(0, -1) : ''}${quote}${quote}`;
|
|
205
|
+
i++;
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
out += c;
|
|
209
|
+
i++;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return out;
|
|
213
|
+
}
|
|
214
|
+
/** `text` for a message, cut to a readable length. */
|
|
215
|
+
function shownExpr(text) {
|
|
216
|
+
return JSON.stringify(text.length > 80 ? `${text.slice(0, 77)}...` : text);
|
|
217
|
+
}
|
|
218
|
+
/** Report one `=`-expression whose bare `=` prefix makes it C#. */
|
|
219
|
+
function checkLanguagePrefix(expr, where, out) {
|
|
220
|
+
if (!expr || !expr.startsWith('=') || expr.startsWith(JS_EXPR_PREFIX) || OTHER_PREFIX.test(expr))
|
|
221
|
+
return;
|
|
222
|
+
if (DATA_FABRIC_LOOKUP.test(expr))
|
|
223
|
+
return;
|
|
224
|
+
const body = expr.slice(1).trim();
|
|
225
|
+
if (body === '' || PLAIN_PATH.test(body) || PLAIN_LITERAL.test(body))
|
|
226
|
+
return;
|
|
227
|
+
const code = maskStrings(body);
|
|
228
|
+
if (code === undefined)
|
|
229
|
+
return;
|
|
230
|
+
const shown = shownExpr(expr);
|
|
231
|
+
const csharp = CSHARP_ONLY.some((re) => re.test(code));
|
|
232
|
+
// `=js:` + the same text is a fix only when the body has no C# of its own.
|
|
233
|
+
const suggestion = csharp ? {} : { suggestion: `${JS_EXPR_PREFIX}${body}` };
|
|
234
|
+
const fix = csharp ? 'Rewrite it in JavaScript and prefix it with `=js:`.' : 'Prefix it with `=js:`.';
|
|
235
|
+
const jsOnly = JS_ONLY.find(({ re }) => re.test(code));
|
|
236
|
+
if (jsOnly?.definite) {
|
|
237
|
+
out.push({
|
|
238
|
+
level: 'error',
|
|
239
|
+
code: 'EXPR_BARE_PREFIX_JS_SYNTAX',
|
|
240
|
+
message: `Expression ${shown} starts with a bare \`=\`, which Studio Web and the Maestro runtime read as C#, `
|
|
241
|
+
+ `but it uses ${jsOnly.named}, which is JavaScript. The run faults or the condition reads false, `
|
|
242
|
+
+ `while validate passes. ${fix}`,
|
|
243
|
+
...suggestion,
|
|
244
|
+
where,
|
|
245
|
+
});
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
const uses = jsOnly ? ` It uses ${jsOnly.named}, which C# has only as a member of that name.` : '';
|
|
249
|
+
out.push({
|
|
250
|
+
level: 'warning',
|
|
251
|
+
code: 'EXPR_BARE_PREFIX',
|
|
252
|
+
message: `Expression ${shown} starts with a bare \`=\`, which Studio Web and the Maestro runtime read as C#; `
|
|
253
|
+
+ `only \`=js:\` marks JavaScript.${uses} Studio Web opens it in its C# editor. `
|
|
254
|
+
+ (csharp
|
|
255
|
+
? 'It uses C#, so keep it if the C# is meant; otherwise rewrite it in JavaScript and prefix it with `=js:`.'
|
|
256
|
+
: 'Prefix it with `=js:`, unless the C# is meant (an expression decompiled from the canvas, say).'),
|
|
257
|
+
...suggestion,
|
|
258
|
+
where,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Codes that advise how NEW expression text should be written. `check --baseline` drops
|
|
263
|
+
* them on an element the edit did not change (check-baseline.ts): an untouched
|
|
264
|
+
* expression is the original's, and an edit is not asked to rewrite it.
|
|
265
|
+
*/
|
|
266
|
+
export const AUTHORING_ADVICE_CODES = new Set(['EXPR_BARE_PREFIX']);
|
|
129
267
|
/** Every finding on one field. */
|
|
130
268
|
function checkField(f, out) {
|
|
131
269
|
if (f.form === 'script')
|
|
@@ -144,6 +282,23 @@ export function checkBpmnExpressions(built) {
|
|
|
144
282
|
}
|
|
145
283
|
return out;
|
|
146
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* Every expression in a built BPMN process that the platform reads as C# while the
|
|
287
|
+
* author most likely meant JavaScript (#2137): `EXPR_BARE_PREFIX` and
|
|
288
|
+
* `EXPR_BARE_PREFIX_JS_SYNTAX`, on the same fields as {@link checkBpmnExpressions}.
|
|
289
|
+
*/
|
|
290
|
+
export function checkBpmnExpressionLanguage(built) {
|
|
291
|
+
const out = [];
|
|
292
|
+
for (const f of bpmnExpressionFields(built)) {
|
|
293
|
+
if (f.form !== 'expression')
|
|
294
|
+
continue;
|
|
295
|
+
const found = [];
|
|
296
|
+
checkLanguagePrefix(f.text, f.where, found);
|
|
297
|
+
for (const d of found)
|
|
298
|
+
out.push({ ...d, elementId: f.elementId, path: f.path });
|
|
299
|
+
}
|
|
300
|
+
return out;
|
|
301
|
+
}
|
|
147
302
|
/**
|
|
148
303
|
* Was thrown by `BpmnBuilder.build()` when the first-level expression check found an
|
|
149
304
|
* undeclared `vars.<name>` reference. `message` lists every problem; `diagnostics`
|
package/dist/bpmn/bpmn-sdk.d.ts
CHANGED
|
@@ -377,7 +377,12 @@ export interface BpmnFlow {
|
|
|
377
377
|
target: string;
|
|
378
378
|
/** Edge label the designer shows. */
|
|
379
379
|
name?: string;
|
|
380
|
-
/**
|
|
380
|
+
/**
|
|
381
|
+
* `=`-expression gating this flow (exclusive/inclusive gateway outgoing), e.g.
|
|
382
|
+
* `'=js:vars.status == "ok"'`. Read a declared process variable as `vars.<id>`. Write
|
|
383
|
+
* `=js:` for JavaScript: Studio Web and the runtime read a bare `=` as C#, and
|
|
384
|
+
* `check` says so (`EXPR_BARE_PREFIX`).
|
|
385
|
+
*/
|
|
381
386
|
condition?: string;
|
|
382
387
|
/**
|
|
383
388
|
* Set on a flow the builder wrote by implication — an arm's chain, a handler's path,
|
|
@@ -2065,7 +2070,7 @@ export interface MessageHandlerOpts extends HandlerOpts {
|
|
|
2065
2070
|
* arm nobody gave a condition cannot be written.
|
|
2066
2071
|
*/
|
|
2067
2072
|
export type ChooseArm = {
|
|
2068
|
-
/** `=`-expression selecting this arm, e.g. `'=vars.action == "Approved"'`. */
|
|
2073
|
+
/** `=`-expression selecting this arm, e.g. `'=js:vars.action == "Approved"'`. */
|
|
2069
2074
|
when: string;
|
|
2070
2075
|
/** Not on a conditioned arm. */
|
|
2071
2076
|
otherwise?: never;
|
|
@@ -3363,7 +3368,7 @@ declare abstract class ScopeBuilder {
|
|
|
3363
3368
|
* .startEvent('start')
|
|
3364
3369
|
* .task('decide', { set: { action: 'Approved' } })
|
|
3365
3370
|
* .choose('approved', [
|
|
3366
|
-
* { when: '=vars.action == "Approved"', label: 'Yes', body: (b) => b.task('post', { set: { status: 'posted' } }) },
|
|
3371
|
+
* { when: '=js:vars.action == "Approved"', label: 'Yes', body: (b) => b.task('post', { set: { status: 'posted' } }) },
|
|
3367
3372
|
* { otherwise: true, label: 'No', body: (b) => b.task('reject', { set: { status: 'rejected' } }) },
|
|
3368
3373
|
* ])
|
|
3369
3374
|
* .endEvent('done')
|
|
@@ -3468,7 +3473,7 @@ declare abstract class ScopeBuilder {
|
|
|
3468
3473
|
* ])
|
|
3469
3474
|
* .startEvent('Start_1')
|
|
3470
3475
|
* .choose('Gw_1', [
|
|
3471
|
-
* { when: '=vars.total > 1000', body: (b) => b.task('Review').goto('Done') },
|
|
3476
|
+
* { when: '=js:vars.total > 1000', body: (b) => b.task('Review').goto('Done') },
|
|
3472
3477
|
* { otherwise: true, body: (b) => b.task('Pay').goto('Done') },
|
|
3473
3478
|
* ])
|
|
3474
3479
|
* .endEvent('Done')
|
|
@@ -3679,7 +3684,7 @@ export declare class PathBuilder extends ScopeBuilder {
|
|
|
3679
3684
|
* .startEvent('start')
|
|
3680
3685
|
* .scriptTask('attempt', { script: 'return { ok: true };', outputs: { ok: '=result.response.ok' } })
|
|
3681
3686
|
* .choose('worked', [
|
|
3682
|
-
* { when: '=vars.ok == true', body: (b) => b.endEvent('done') },
|
|
3687
|
+
* { when: '=js:vars.ok == true', body: (b) => b.endEvent('done') },
|
|
3683
3688
|
* { otherwise: true, body: (b) => b.goto('attempt') },
|
|
3684
3689
|
* ])
|
|
3685
3690
|
* .sequenceFlow('start', 'attempt')
|
package/dist/bpmn/bpmn-sdk.js
CHANGED
|
@@ -2263,7 +2263,7 @@ class ScopeBuilder {
|
|
|
2263
2263
|
* .startEvent('start')
|
|
2264
2264
|
* .task('decide', { set: { action: 'Approved' } })
|
|
2265
2265
|
* .choose('approved', [
|
|
2266
|
-
* { when: '=vars.action == "Approved"', label: 'Yes', body: (b) => b.task('post', { set: { status: 'posted' } }) },
|
|
2266
|
+
* { when: '=js:vars.action == "Approved"', label: 'Yes', body: (b) => b.task('post', { set: { status: 'posted' } }) },
|
|
2267
2267
|
* { otherwise: true, label: 'No', body: (b) => b.task('reject', { set: { status: 'rejected' } }) },
|
|
2268
2268
|
* ])
|
|
2269
2269
|
* .endEvent('done')
|
|
@@ -2399,7 +2399,7 @@ class ScopeBuilder {
|
|
|
2399
2399
|
* ])
|
|
2400
2400
|
* .startEvent('Start_1')
|
|
2401
2401
|
* .choose('Gw_1', [
|
|
2402
|
-
* { when: '=vars.total > 1000', body: (b) => b.task('Review').goto('Done') },
|
|
2402
|
+
* { when: '=js:vars.total > 1000', body: (b) => b.task('Review').goto('Done') },
|
|
2403
2403
|
* { otherwise: true, body: (b) => b.task('Pay').goto('Done') },
|
|
2404
2404
|
* ])
|
|
2405
2405
|
* .endEvent('Done')
|
|
@@ -2711,7 +2711,7 @@ export class PathBuilder extends ScopeBuilder {
|
|
|
2711
2711
|
* .startEvent('start')
|
|
2712
2712
|
* .scriptTask('attempt', { script: 'return { ok: true };', outputs: { ok: '=result.response.ok' } })
|
|
2713
2713
|
* .choose('worked', [
|
|
2714
|
-
* { when: '=vars.ok == true', body: (b) => b.endEvent('done') },
|
|
2714
|
+
* { when: '=js:vars.ok == true', body: (b) => b.endEvent('done') },
|
|
2715
2715
|
* { otherwise: true, body: (b) => b.goto('attempt') },
|
|
2716
2716
|
* ])
|
|
2717
2717
|
* .sequenceFlow('start', 'attempt')
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
* - `edited` otherwise: an element the edit changed or added, or an untouched element
|
|
19
19
|
* the original does not have the finding on (an edit elsewhere broke it).
|
|
20
20
|
*
|
|
21
|
+
* A pre-existing finding of a code in `AUTHORING_ADVICE_CODES` (advice on how to write a
|
|
22
|
+
* new expression, such as `EXPR_BARE_PREFIX`) is dropped: the edit did not write that text.
|
|
23
|
+
*
|
|
21
24
|
* An element is unchanged when the edited build and the original's build hold the same
|
|
22
25
|
* element under its id: the same node (kind, name, type, inputs, outputs, extension
|
|
23
26
|
* payload, every field the builder carries), the same sequence flow (source, target,
|
|
@@ -34,6 +37,7 @@
|
|
|
34
37
|
*/
|
|
35
38
|
import { baselineSummary, preExistingFindings, scopeFindings } from '../core/baseline-scope.js';
|
|
36
39
|
import { refusalClass } from '../core/refusals.js';
|
|
40
|
+
import { AUTHORING_ADVICE_CODES } from './bpmn-expr-check.js';
|
|
37
41
|
import { checkModel } from './check.js';
|
|
38
42
|
import { readStamp, sourceDigest } from './decompile-stamp.js';
|
|
39
43
|
import { stableJson } from './lift-verify.js';
|
|
@@ -116,7 +120,8 @@ export function scopeToEdit(edited, baseline) {
|
|
|
116
120
|
const place = placeOf(d, editedIndex);
|
|
117
121
|
return { ...d, ...(place !== '' ? { nodeId: place } : {}), ...(cls !== undefined ? { class: cls } : {}) };
|
|
118
122
|
});
|
|
119
|
-
const out = scopeFindings(classed, preExisting, PRE_EXISTING_LOWERING_NOTE)
|
|
123
|
+
const out = scopeFindings(classed, preExisting, PRE_EXISTING_LOWERING_NOTE)
|
|
124
|
+
.filter((d) => !(d.origin === 'pre-existing' && AUTHORING_ADVICE_CODES.has(d.code)));
|
|
120
125
|
const stop = edited.checked.stoppedAt;
|
|
121
126
|
if (stop) {
|
|
122
127
|
const at = stop.code !== undefined ? `[${stop.code}] ` : '';
|
package/dist/bpmn/check.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { parse } from 'acorn';
|
|
19
19
|
import { jsChildren, memberName, scopeBinds } from './script-js.js';
|
|
20
|
-
import { checkBpmnExpressions } from './bpmn-expr-check.js';
|
|
20
|
+
import { checkBpmnExpressionLanguage, checkBpmnExpressions } from './bpmn-expr-check.js';
|
|
21
21
|
import { allNodes, collectSerializerModel, folderCompanionKeys, implicitNodeVars, processId } from './serialize.js';
|
|
22
22
|
import { refreshConnectionDiagnostics } from './refresh-connections.js';
|
|
23
23
|
import { KNOWN_METHOD_SET } from './known-methods.js';
|
|
@@ -207,7 +207,8 @@ function refreshConnections(built, definitions, stoodIn, diags) {
|
|
|
207
207
|
}
|
|
208
208
|
/**
|
|
209
209
|
* The first-level expression check (bpmn-expr-check): an undeclared `vars.<name>` or
|
|
210
|
-
* `bindings.<name>` read,
|
|
210
|
+
* `bindings.<name>` read, a declared variable read without `vars.`, or an expression
|
|
211
|
+
* whose bare `=` prefix makes it C# when JavaScript was meant (#2137).
|
|
211
212
|
*
|
|
212
213
|
* Both codes are `lint` (decided on #1712): the serializer writes the read exactly as
|
|
213
214
|
* authored, so `compile` writes it and `check` is where it is reported. It ran in
|
|
@@ -217,7 +218,7 @@ function refreshConnections(built, definitions, stoodIn, diags) {
|
|
|
217
218
|
*/
|
|
218
219
|
function checkExpressions(built, diags) {
|
|
219
220
|
const nodeIds = new Set(allNodes(built.nodes).map((n) => n.id));
|
|
220
|
-
for (const d of checkBpmnExpressions(built)) {
|
|
221
|
+
for (const d of [...checkBpmnExpressions(built), ...checkBpmnExpressionLanguage(built)]) {
|
|
221
222
|
diags.push({
|
|
222
223
|
level: d.level,
|
|
223
224
|
code: d.code,
|
package/dist/bpmn-api.md
CHANGED
|
@@ -615,7 +615,7 @@ One sequence flow in the built graph — the edge from `source` to `target` (`bp
|
|
|
615
615
|
- `BpmnFlow.source: string` — The id of the element the flow leaves.
|
|
616
616
|
- `BpmnFlow.target: string` — The id of the element it arrives at.
|
|
617
617
|
- `BpmnFlow.name?: string` — Edge label the designer shows.
|
|
618
|
-
- `BpmnFlow.condition?: string` — `=`-expression gating this flow (exclusive/inclusive gateway outgoing).
|
|
618
|
+
- `BpmnFlow.condition?: string` — `=`-expression gating this flow (exclusive/inclusive gateway outgoing), e.g. `'=js:vars.status == "ok"'`.
|
|
619
619
|
- `BpmnFlow.implied?: true` — Set on a flow the builder wrote by implication — an arm's chain, a handler's path, a construct's join, or a…
|
|
620
620
|
|
|
621
621
|
### `BpmnVarDecl`
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -355,6 +355,8 @@ export declare const REFUSALS: {
|
|
|
355
355
|
readonly EVENT_WHERE_NOT_SCALAR: "lowering";
|
|
356
356
|
readonly EXCEPTION_STAGE_REQUIRED: "lint";
|
|
357
357
|
readonly EXPR_ARGUMENT_REF: "lint";
|
|
358
|
+
readonly EXPR_BARE_PREFIX: "lint";
|
|
359
|
+
readonly EXPR_BARE_PREFIX_JS_SYNTAX: "lint";
|
|
358
360
|
readonly EXPR_BARE_VAR_REF: "lint";
|
|
359
361
|
readonly EXPR_SYNTAX: "lowering";
|
|
360
362
|
readonly EXPR_UNDECLARED_REF: "lint";
|
package/dist/core/refusals.js
CHANGED
|
@@ -429,6 +429,8 @@ export const REFUSALS = {
|
|
|
429
429
|
EVENT_WHERE_NOT_SCALAR: 'lowering',
|
|
430
430
|
EXCEPTION_STAGE_REQUIRED: 'lint',
|
|
431
431
|
EXPR_ARGUMENT_REF: 'lint',
|
|
432
|
+
EXPR_BARE_PREFIX: 'lint',
|
|
433
|
+
EXPR_BARE_PREFIX_JS_SYNTAX: 'lint',
|
|
432
434
|
EXPR_BARE_VAR_REF: 'lint',
|
|
433
435
|
EXPR_SYNTAX: 'lowering',
|
|
434
436
|
EXPR_UNDECLARED_REF: 'lint',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.120.
|
|
3
|
+
"version": "6.120.21",
|
|
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": "e6178daa6ae6b993efc27cf07a2ed1d9b21a9e23"
|
|
128
128
|
}
|