@uipath/maestro-builder-sdk 6.66.7 → 6.66.8
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/bindings-v2.d.ts +15 -1
- package/dist/bindings-v2.js +29 -6
- package/dist/bpmn/check.js +16 -113
- package/dist/bpmn/serialize.d.ts +41 -0
- package/dist/bpmn/serialize.js +103 -1
- package/dist/bpmn/typed-node.d.ts +12 -0
- package/dist/bpmn/typed-node.js +24 -0
- package/dist/case/check.js +5 -40
- package/dist/case/serialize.js +6 -0
- package/dist/case/task-shape.d.ts +31 -0
- package/dist/case/task-shape.js +48 -0
- package/dist/check.js +5 -33
- package/dist/core/compile-refusal.d.ts +25 -0
- package/dist/core/compile-refusal.js +19 -0
- package/dist/core/process-resource.d.ts +9 -0
- package/dist/core/process-resource.js +4 -0
- package/dist/core/refusals.d.ts +24 -22
- package/dist/core/refusals.js +24 -22
- package/dist/nodes/connector/flow/node-type.js +5 -3
- package/dist/nodes/process/flow/check.js +15 -80
- package/dist/nodes/process/flow/node-type.js +4 -0
- package/dist/nodes/process/flow/refusals.d.ts +8 -0
- package/dist/nodes/process/flow/refusals.js +92 -0
- package/dist/nodes/queue/flow/check.d.ts +25 -0
- package/dist/nodes/queue/flow/check.js +48 -18
- package/dist/nodes/queue/flow/node-type.js +13 -1
- package/dist/nodes/transform/flow/check.js +31 -43
- package/dist/nodes/transform/flow/node-type.js +35 -9
- package/dist/serialize.js +142 -19
- package/package.json +2 -2
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every key an `ActionField` takes. `compile` writes only these onto the form
|
|
3
|
+
* row. The `satisfies` keeps this list and the interface in step: a key added
|
|
4
|
+
* to one and not the other fails to type-check.
|
|
5
|
+
*/
|
|
6
|
+
const ACTION_FIELD_KEYS = new Set(Object.keys({
|
|
7
|
+
name: true, type: true, subType: true, displayName: true, value: true, required: true, options: true,
|
|
8
|
+
}));
|
|
9
|
+
/**
|
|
10
|
+
* Every problem with `task`'s shape, in a fixed order: the timer first, then
|
|
11
|
+
* each action input field, then each output field.
|
|
12
|
+
*
|
|
13
|
+
* @param task - The task as the builder recorded it.
|
|
14
|
+
* @returns The problems, empty when the task is well formed.
|
|
15
|
+
*/
|
|
16
|
+
export function taskShapeProblems(task) {
|
|
17
|
+
const problems = [];
|
|
18
|
+
if (task.kind === 'wait-for-timer') {
|
|
19
|
+
// Count every key that is set, blank or not: serialize writes the first
|
|
20
|
+
// truthy value, so `{ duration: ' ', date: '2027-…' }` would write the
|
|
21
|
+
// blank duration and drop the date.
|
|
22
|
+
const setValues = [task.timer?.duration, task.timer?.date, task.timer?.cycle]
|
|
23
|
+
.filter((value) => value !== undefined);
|
|
24
|
+
const [only] = setValues;
|
|
25
|
+
if (setValues.length !== 1 || typeof only !== 'string' || only.trim().length === 0)
|
|
26
|
+
problems.push({
|
|
27
|
+
code: 'TIMER_VALUE_REQUIRED',
|
|
28
|
+
message: `Timer task "${task.name}" needs exactly one of duration, date, or cycle, and it must not be blank. For a validating stand-in, use .waitForTimer({ duration: 'PT1M' }).`,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
for (const [side, fields] of [['input', task.action?.inputs], ['output', task.action?.outputs]])
|
|
32
|
+
for (const field of fields ?? []) {
|
|
33
|
+
const unknown = Object.keys(field)
|
|
34
|
+
.filter((key) => !ACTION_FIELD_KEYS.has(key) && field[key] !== undefined);
|
|
35
|
+
if (!unknown.length)
|
|
36
|
+
continue;
|
|
37
|
+
problems.push({
|
|
38
|
+
code: 'ACTION_FIELD_UNKNOWN_KEY',
|
|
39
|
+
message: `Action ${side} field "${String(field.name)}" in task "${task.name}" has ${unknown.length === 1 ? 'a key' : 'keys'} ` +
|
|
40
|
+
`${unknown.map((key) => `"${key}"`).join(', ')} that an action field does not take. ` +
|
|
41
|
+
`An action field takes ${[...ACTION_FIELD_KEYS].join(', ')}. ` +
|
|
42
|
+
(side === 'output'
|
|
43
|
+
? `To choose the case variable an output writes, set value: '<variable>'; compile writes the row's id, var, source and target from it.`
|
|
44
|
+
: `An input's value is the literal or =vars.<name> expression the assignee sees.`),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return problems;
|
|
48
|
+
}
|
package/dist/check.js
CHANGED
|
@@ -622,22 +622,10 @@ function checkFlow(built, ancestors, opts = {}) {
|
|
|
622
622
|
if (c.when)
|
|
623
623
|
addExpr(c.when.js, s.name);
|
|
624
624
|
switchNames.add(s.name);
|
|
625
|
+
// A malformed case form or case id is the serializer's SWITCH_CASE_FORM /
|
|
626
|
+
// SWITCH_CASE_ID (`refuseSwitchCases`).
|
|
625
627
|
s.cases.forEach((c, i) => {
|
|
626
|
-
|
|
627
|
-
const hasWhen = c.when !== undefined;
|
|
628
|
-
if (hasValue === hasWhen || (hasValue && !s.on)) {
|
|
629
|
-
diags.push({
|
|
630
|
-
level: 'error',
|
|
631
|
-
code: 'SWITCH_CASE_FORM',
|
|
632
|
-
message: hasValue && hasWhen
|
|
633
|
-
? `Switch "${s.name}" case ${i + 1} has both \`value\` and \`when\`. Give it one: \`value\` is compared with \`on\`, \`when\` is the case's own condition.`
|
|
634
|
-
: hasValue
|
|
635
|
-
? `Switch "${s.name}" case ${i + 1} has a \`value\` but the switch has no \`on\` to compare it with. Pass \`on\`, or give the case a \`when\` condition.`
|
|
636
|
-
: `Switch "${s.name}" case ${i + 1} has neither \`value\` nor \`when\`.`,
|
|
637
|
-
step: s.name,
|
|
638
|
-
});
|
|
639
|
-
}
|
|
640
|
-
if (hasWhen && c.when.literal) {
|
|
628
|
+
if (c.when !== undefined && c.when.literal) {
|
|
641
629
|
diags.push({
|
|
642
630
|
level: 'error',
|
|
643
631
|
code: 'SWITCH_CONST_WHEN',
|
|
@@ -681,23 +669,6 @@ function checkFlow(built, ancestors, opts = {}) {
|
|
|
681
669
|
// Two arms with the same value: the second can never be reached, since
|
|
682
670
|
// the runtime takes the first matching case.
|
|
683
671
|
const seenValues = new Set();
|
|
684
|
-
// Two cases on one id share one `case-<id>` port (#1130: an explicit
|
|
685
|
-
// `id` can collide with a positional `case_<n>`).
|
|
686
|
-
const seenIds = new Set();
|
|
687
|
-
s.cases.forEach((c, i) => {
|
|
688
|
-
const caseId = c.id ?? `case_${i + 1}`;
|
|
689
|
-
if (typeof caseId !== 'string' || caseId === '' || seenIds.has(caseId)) {
|
|
690
|
-
diags.push({
|
|
691
|
-
level: 'error',
|
|
692
|
-
code: 'SWITCH_CASE_ID',
|
|
693
|
-
message: typeof caseId !== 'string' || caseId === ''
|
|
694
|
-
? `Switch "${s.name}" case ${i + 1} has an id that is not a non-empty string. Leave \`id\` out for the positional case_<n>.`
|
|
695
|
-
: `Switch "${s.name}" has two cases with the id "${caseId}", so both would leave from one 'case-${caseId}' port. Give one a different \`id\`.`,
|
|
696
|
-
step: s.name,
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
seenIds.add(String(caseId));
|
|
700
|
-
});
|
|
701
672
|
for (const c of s.cases) {
|
|
702
673
|
const key = c.when !== undefined ? `when:${c.when.js}` : `${typeof c.value}:${String(c.value)}`;
|
|
703
674
|
if (seenValues.has(key))
|
|
@@ -907,7 +878,8 @@ function checkFlow(built, ancestors, opts = {}) {
|
|
|
907
878
|
checkRegisteredFamilies(registeredSteps, unresolvedSteps, stepNames, diags);
|
|
908
879
|
checkPackageNodes(registeredSteps, diags);
|
|
909
880
|
// Entry points: valid triggers. An id that collides with a step, the trigger
|
|
910
|
-
// or another entry point is
|
|
881
|
+
// or another entry point (or is `start` while `.triggerId()` renames the
|
|
882
|
+
// trigger, #1518) is the serializer's ENTRY_POINT_DUP_ID.
|
|
911
883
|
for (const ep of built.entryPoints ?? []) {
|
|
912
884
|
const maybeCustomEp = ep.trigger;
|
|
913
885
|
if (!('kind' in maybeCustomEp) && maybeCustomEp instanceof FlowNode) {
|
|
@@ -25,3 +25,28 @@ export declare class CompileRefusal extends Error {
|
|
|
25
25
|
readonly suggestion?: string;
|
|
26
26
|
constructor(code: string, message: string, suggestion?: string);
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* A node's use of a tenant connection, as the file-wide
|
|
30
|
+
* CONNECTION_CONNECTOR_CONFLICT rule reads it (`connectionConnectors`,
|
|
31
|
+
* bindings-v2.ts): the connector the connection must belong to, and the
|
|
32
|
+
* connection id (the resolved bindings.json key, else the label as written).
|
|
33
|
+
*/
|
|
34
|
+
export interface ConnectionUse {
|
|
35
|
+
connector: string;
|
|
36
|
+
connection: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* LIBRARY_REQUIRED for a node that calls Integration Service on a connection:
|
|
40
|
+
* a connector step, an event trigger or entry point, a `waitForEvent`.
|
|
41
|
+
*
|
|
42
|
+
* Without a library the node cannot be emitted, so collect mode (`check`)
|
|
43
|
+
* stands it in with no `detail`, and the file-wide connection rule would not
|
|
44
|
+
* see it. `connection` is what the node would have run on: the stand-in keeps
|
|
45
|
+
* it, so `check` with no library reports CONNECTION_CONNECTOR_CONFLICT as
|
|
46
|
+
* `compile --library` does (builder-sdk#1518). For instance a Slack step and an
|
|
47
|
+
* Outlook step both on label `slack`.
|
|
48
|
+
*/
|
|
49
|
+
export declare class LibraryRequiredRefusal extends CompileRefusal {
|
|
50
|
+
readonly connection?: ConnectionUse;
|
|
51
|
+
constructor(message: string, connection?: ConnectionUse);
|
|
52
|
+
}
|
|
@@ -32,3 +32,22 @@ export class CompileRefusal extends Error {
|
|
|
32
32
|
this.suggestion = suggestion;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* LIBRARY_REQUIRED for a node that calls Integration Service on a connection:
|
|
37
|
+
* a connector step, an event trigger or entry point, a `waitForEvent`.
|
|
38
|
+
*
|
|
39
|
+
* Without a library the node cannot be emitted, so collect mode (`check`)
|
|
40
|
+
* stands it in with no `detail`, and the file-wide connection rule would not
|
|
41
|
+
* see it. `connection` is what the node would have run on: the stand-in keeps
|
|
42
|
+
* it, so `check` with no library reports CONNECTION_CONNECTOR_CONFLICT as
|
|
43
|
+
* `compile --library` does (builder-sdk#1518). For instance a Slack step and an
|
|
44
|
+
* Outlook step both on label `slack`.
|
|
45
|
+
*/
|
|
46
|
+
export class LibraryRequiredRefusal extends CompileRefusal {
|
|
47
|
+
connection;
|
|
48
|
+
constructor(message, connection) {
|
|
49
|
+
super('LIBRARY_REQUIRED', message);
|
|
50
|
+
if (connection !== undefined)
|
|
51
|
+
this.connection = connection;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -105,3 +105,12 @@ export declare function processResourceBindings(spec: {
|
|
|
105
105
|
* value, say so and name the replacement.
|
|
106
106
|
*/
|
|
107
107
|
export declare function renamedFieldMessage(label: string, step: string, oldField: string): string;
|
|
108
|
+
/**
|
|
109
|
+
* The process family's kinds — one per factory (`rpaWorkflow`, `apiWorkflow`,
|
|
110
|
+
* `publishedFunction`, `agenticProcess`, `agent`). The node types, the checks
|
|
111
|
+
* and the serializer's refusals all key on this one union, so a new kind added
|
|
112
|
+
* here reaches every table that is a `Record<ProcessKind, …>`.
|
|
113
|
+
*/
|
|
114
|
+
export type ProcessKind = 'rpaWorkflow' | 'apiWorkflow' | 'publishedFunction' | 'agenticProcess' | 'agent';
|
|
115
|
+
/** A resource field the author left out: undefined, null, or a whitespace-only string. */
|
|
116
|
+
export declare function blank(v: unknown): boolean;
|
|
@@ -117,3 +117,7 @@ export function renamedFieldMessage(label, step, oldField) {
|
|
|
117
117
|
`published-resource factories now take \`key\` — the GUID in the process's \`Key\` field ` +
|
|
118
118
|
`(\`uip or processes list\`) — so they read the same way. Rename \`${oldField}:\` to \`key:\`.`);
|
|
119
119
|
}
|
|
120
|
+
/** A resource field the author left out: undefined, null, or a whitespace-only string. */
|
|
121
|
+
export function blank(v) {
|
|
122
|
+
return v === undefined || v === null || (typeof v === 'string' && v.trim() === '');
|
|
123
|
+
}
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -8,21 +8,21 @@ export type RefusalClass = 'lint' | 'lowering' | 'draft';
|
|
|
8
8
|
* code means the same condition in each.
|
|
9
9
|
*/
|
|
10
10
|
export declare const REFUSALS: {
|
|
11
|
-
readonly ACTION_FIELD_UNKNOWN_KEY: "
|
|
11
|
+
readonly ACTION_FIELD_UNKNOWN_KEY: "lowering";
|
|
12
12
|
readonly AGENTIC_EMPTY_RETURNS: "lint";
|
|
13
13
|
readonly AGENTIC_KEY_NOT_KEY: "lint";
|
|
14
14
|
readonly AGENTIC_LOCAL_FORM_UNVERIFIED: "lint";
|
|
15
|
-
readonly AGENTIC_LOCAL_HAS_FOLDER: "
|
|
15
|
+
readonly AGENTIC_LOCAL_HAS_FOLDER: "lowering";
|
|
16
16
|
readonly AGENTIC_LOCAL_NO_PROJECT_ID: "lint";
|
|
17
17
|
readonly AGENTIC_LOCAL_PROJECT_ID_NOT_GUID: "lint";
|
|
18
18
|
readonly AGENTIC_NAME_IS_PATH: "lint";
|
|
19
19
|
readonly AGENTIC_NO_FOLDER: "lint";
|
|
20
|
-
readonly AGENTIC_NO_KEY: "
|
|
20
|
+
readonly AGENTIC_NO_KEY: "lowering";
|
|
21
21
|
readonly AGENTIC_NO_NAME: "lint";
|
|
22
22
|
readonly AGENTIC_READ_NOT_OUTPUT: "lint";
|
|
23
23
|
readonly AGENTIC_READ_UNKNOWN_FIELD: "lint";
|
|
24
24
|
readonly AGENTIC_READ_WITHOUT_RETURNS: "lint";
|
|
25
|
-
readonly AGENTIC_RESERVED_INPUT: "
|
|
25
|
+
readonly AGENTIC_RESERVED_INPUT: "lowering";
|
|
26
26
|
readonly AGENT_CONTEXT_NO_FOLDER_PATH: "lint";
|
|
27
27
|
readonly AGENT_CONTEXT_NO_ID: "lowering";
|
|
28
28
|
readonly AGENT_CONTEXT_QUERY_NOT_EXPRESSION: "lint";
|
|
@@ -35,7 +35,7 @@ export declare const REFUSALS: {
|
|
|
35
35
|
readonly AGENT_MEMORY_VERSION_NO_HANDLE: "lowering";
|
|
36
36
|
readonly AGENT_NAME_IS_PATH: "lint";
|
|
37
37
|
readonly AGENT_NO_FOLDER: "lint";
|
|
38
|
-
readonly AGENT_NO_KEY: "
|
|
38
|
+
readonly AGENT_NO_KEY: "lowering";
|
|
39
39
|
readonly AGENT_NO_NAME: "lint";
|
|
40
40
|
readonly AGENT_READ_NOT_OUTPUT: "lint";
|
|
41
41
|
readonly AGENT_READ_UNKNOWN_FIELD: "lint";
|
|
@@ -45,7 +45,7 @@ export declare const REFUSALS: {
|
|
|
45
45
|
readonly APIWF_KEY_NOT_KEY: "lint";
|
|
46
46
|
readonly APIWF_NAME_IS_PATH: "lint";
|
|
47
47
|
readonly APIWF_NO_FOLDER: "lint";
|
|
48
|
-
readonly APIWF_NO_KEY: "
|
|
48
|
+
readonly APIWF_NO_KEY: "lowering";
|
|
49
49
|
readonly APIWF_NO_NAME: "lint";
|
|
50
50
|
readonly APIWF_READ_NOT_OUTPUT: "lint";
|
|
51
51
|
readonly APIWF_READ_UNKNOWN_FIELD: "lint";
|
|
@@ -109,6 +109,7 @@ export declare const REFUSALS: {
|
|
|
109
109
|
readonly BPMN_HUMAN_TASK_APP_XOR_FORM: "lowering";
|
|
110
110
|
readonly BPMN_JSON_INPUT_CDATA_END: "lowering";
|
|
111
111
|
readonly BPMN_NO_DEFAULT_EXPORT: "lowering";
|
|
112
|
+
readonly BPMN_NO_ID: "lowering";
|
|
112
113
|
readonly BPMN_OUTPUT_VAR_NO_OUTPUT_ROW: "lowering";
|
|
113
114
|
readonly BPMN_PATH_ALREADY_LEFT: "lowering";
|
|
114
115
|
readonly BPMN_PATH_NOT_CONTINUED: "lowering";
|
|
@@ -160,7 +161,7 @@ export declare const REFUSALS: {
|
|
|
160
161
|
readonly CONNECTION_STUB: "lint";
|
|
161
162
|
readonly CONNECTOR_IMPORT_NOT_A_FILE: "lowering";
|
|
162
163
|
readonly CONNECTOR_INPUT: "lowering";
|
|
163
|
-
readonly CONNECTOR_INPUTS_SHADOWED: "
|
|
164
|
+
readonly CONNECTOR_INPUTS_SHADOWED: "lowering";
|
|
164
165
|
readonly CONNECTOR_INPUT_MISSING: "draft";
|
|
165
166
|
readonly CONNECTOR_INPUT_ROW_NO_TARGET: "lint";
|
|
166
167
|
readonly CONNECTOR_INPUT_ROW_TARGET_UNKNOWN: "lint";
|
|
@@ -218,12 +219,12 @@ export declare const REFUSALS: {
|
|
|
218
219
|
readonly DOC_NO_FILEREF: "lint";
|
|
219
220
|
readonly DOWHILE_CONST_COND: "lint";
|
|
220
221
|
readonly DOWHILE_LIMIT: "lint";
|
|
221
|
-
readonly DUPLICATE_DOCUMENT_ID: "
|
|
222
|
+
readonly DUPLICATE_DOCUMENT_ID: "lowering";
|
|
222
223
|
readonly DUP_BUSINESS_EVENT: "lowering";
|
|
223
224
|
readonly DUP_CASE: "lint";
|
|
224
225
|
readonly DUP_END_NAME: "lowering";
|
|
225
226
|
readonly DUP_EXIT_RULE: "lint";
|
|
226
|
-
readonly DUP_ID: "
|
|
227
|
+
readonly DUP_ID: "lowering";
|
|
227
228
|
readonly DUP_RULE_NAME: "lint";
|
|
228
229
|
readonly DUP_STAGE: "lowering";
|
|
229
230
|
readonly DUP_STEP: "lowering";
|
|
@@ -259,6 +260,7 @@ export declare const REFUSALS: {
|
|
|
259
260
|
readonly EVENT_SCOPE_NOT_TAKEN: "lint";
|
|
260
261
|
readonly EVENT_UNKNOWN: "lowering";
|
|
261
262
|
readonly EVENT_UNPREPARED: "lint";
|
|
263
|
+
readonly EVENT_WHERE_NOT_SCALAR: "lowering";
|
|
262
264
|
readonly EXCEPTION_STAGE_REQUIRED: "lint";
|
|
263
265
|
readonly EXPR_BARE_VAR_REF: "lowering";
|
|
264
266
|
readonly EXPR_SYNTAX: "lowering";
|
|
@@ -286,12 +288,12 @@ export declare const REFUSALS: {
|
|
|
286
288
|
readonly FORM_TRIGGER_NO_INPUTS: "lint";
|
|
287
289
|
readonly FUNCTION_EMPTY_RETURNS: "lint";
|
|
288
290
|
readonly FUNCTION_KEY_NOT_KEY: "lint";
|
|
289
|
-
readonly FUNCTION_LOCAL_HAS_FOLDER: "
|
|
291
|
+
readonly FUNCTION_LOCAL_HAS_FOLDER: "lowering";
|
|
290
292
|
readonly FUNCTION_LOCAL_NO_PROJECT_ID: "lint";
|
|
291
293
|
readonly FUNCTION_LOCAL_PROJECT_ID_NOT_GUID: "lint";
|
|
292
294
|
readonly FUNCTION_NAME_IS_PATH: "lint";
|
|
293
295
|
readonly FUNCTION_NO_FOLDER: "lint";
|
|
294
|
-
readonly FUNCTION_NO_KEY: "
|
|
296
|
+
readonly FUNCTION_NO_KEY: "lowering";
|
|
295
297
|
readonly FUNCTION_NO_NAME: "lint";
|
|
296
298
|
readonly FUNCTION_READ_NOT_OUTPUT: "lint";
|
|
297
299
|
readonly FUNCTION_READ_UNKNOWN_FIELD: "lint";
|
|
@@ -509,7 +511,7 @@ export declare const REFUSALS: {
|
|
|
509
511
|
readonly QUEUE_BAD_PRIORITY: "lint";
|
|
510
512
|
readonly QUEUE_ITEM_EXPR_UNSUPPORTED: "lowering";
|
|
511
513
|
readonly QUEUE_ITEM_FIELD_NOT_PRIMITIVE: "lint";
|
|
512
|
-
readonly QUEUE_ITEM_NOT_OBJECT: "
|
|
514
|
+
readonly QUEUE_ITEM_NOT_OBJECT: "lowering";
|
|
513
515
|
readonly QUEUE_KEY_NOT_GUID: "lint";
|
|
514
516
|
readonly QUEUE_NO_FOLDER: "lint";
|
|
515
517
|
readonly QUEUE_NO_ITEM: "lint";
|
|
@@ -518,7 +520,7 @@ export declare const REFUSALS: {
|
|
|
518
520
|
readonly QUEUE_READ_NOT_OUTPUT: "lint";
|
|
519
521
|
readonly QUEUE_READ_UNKNOWN_FIELD: "lint";
|
|
520
522
|
readonly QUEUE_READ_WITHOUT_RETURNS: "lint";
|
|
521
|
-
readonly QUEUE_RETURNS_WITHOUT_WAIT: "
|
|
523
|
+
readonly QUEUE_RETURNS_WITHOUT_WAIT: "lowering";
|
|
522
524
|
readonly RAW_NODE_CONNECTOR: "lowering";
|
|
523
525
|
readonly RAW_NODE_TYPED_FAMILY: "lint";
|
|
524
526
|
readonly RAW_NODE_UNKNOWN_INPUT: "lowering";
|
|
@@ -540,12 +542,12 @@ export declare const REFUSALS: {
|
|
|
540
542
|
readonly RETRY_INVALID_DURATION: "lint";
|
|
541
543
|
readonly RETURN_UPDATES_SAME_VAR: "lowering";
|
|
542
544
|
readonly RPA_KEY_NOT_KEY: "lint";
|
|
543
|
-
readonly RPA_LOCAL_HAS_FOLDER: "
|
|
545
|
+
readonly RPA_LOCAL_HAS_FOLDER: "lowering";
|
|
544
546
|
readonly RPA_LOCAL_NO_PROJECT_ID: "lint";
|
|
545
547
|
readonly RPA_LOCAL_PROJECT_ID_NOT_GUID: "lint";
|
|
546
548
|
readonly RPA_NAME_IS_PATH: "lint";
|
|
547
549
|
readonly RPA_NO_FOLDER: "lint";
|
|
548
|
-
readonly RPA_NO_KEY: "
|
|
550
|
+
readonly RPA_NO_KEY: "lowering";
|
|
549
551
|
readonly RPA_NO_NAME: "lint";
|
|
550
552
|
readonly RPA_READ_NOT_OUTPUT: "lint";
|
|
551
553
|
readonly RPA_READ_UNKNOWN_FIELD: "lint";
|
|
@@ -613,8 +615,8 @@ export declare const REFUSALS: {
|
|
|
613
615
|
readonly SUBFLOW_UNKNOWN_INPUT: "lint";
|
|
614
616
|
readonly SUBFLOW_UNKNOWN_OUTPUT: "lint";
|
|
615
617
|
readonly SUPERFLUOUS_GATEWAY: "lint";
|
|
616
|
-
readonly SWITCH_CASE_FORM: "
|
|
617
|
-
readonly SWITCH_CASE_ID: "
|
|
618
|
+
readonly SWITCH_CASE_FORM: "lowering";
|
|
619
|
+
readonly SWITCH_CASE_ID: "lowering";
|
|
618
620
|
readonly SWITCH_CASE_TYPE_MISMATCH: "lint";
|
|
619
621
|
readonly SWITCH_CONST_ON: "lint";
|
|
620
622
|
readonly SWITCH_CONST_WHEN: "lint";
|
|
@@ -640,13 +642,13 @@ export declare const REFUSALS: {
|
|
|
640
642
|
readonly TIMER_DURATION_INVALID: "lint";
|
|
641
643
|
readonly TIMER_DURATION_NOT_RUNTIME_PARSEABLE: "lint";
|
|
642
644
|
readonly TIMER_MISSING_FIELD: "lint";
|
|
643
|
-
readonly TIMER_VALUE_REQUIRED: "
|
|
645
|
+
readonly TIMER_VALUE_REQUIRED: "lowering";
|
|
644
646
|
readonly TRANSFORM_AGG_NO_ALIAS: "lint";
|
|
645
647
|
readonly TRANSFORM_AGG_NO_FIELD: "lint";
|
|
646
648
|
readonly TRANSFORM_BAD_VOCAB: "lint";
|
|
647
|
-
readonly TRANSFORM_COLLECTION_LITERAL: "
|
|
649
|
+
readonly TRANSFORM_COLLECTION_LITERAL: "lowering";
|
|
648
650
|
readonly TRANSFORM_COLLECTION_NOT_PATH: "lint";
|
|
649
|
-
readonly TRANSFORM_COLLECTION_NOT_REF: "
|
|
651
|
+
readonly TRANSFORM_COLLECTION_NOT_REF: "lowering";
|
|
650
652
|
readonly TRANSFORM_COLLECTION_SCALAR: "lint";
|
|
651
653
|
readonly TRANSFORM_CONTAINS_ARRAY_VALUE: "lint";
|
|
652
654
|
readonly TRANSFORM_EMPTY_FILTER: "lint";
|
|
@@ -654,10 +656,10 @@ export declare const REFUSALS: {
|
|
|
654
656
|
readonly TRANSFORM_FILTER_NO_FIELD: "lint";
|
|
655
657
|
readonly TRANSFORM_FILTER_VALUE_EXPR: "lint";
|
|
656
658
|
readonly TRANSFORM_MAP_NO_FIELD: "lint";
|
|
657
|
-
readonly TRANSFORM_NO_COLLECTION: "
|
|
659
|
+
readonly TRANSFORM_NO_COLLECTION: "lowering";
|
|
658
660
|
readonly TRANSFORM_NO_GROUP_FIELD: "lint";
|
|
659
661
|
readonly TRANSFORM_NO_OPERATIONS: "lint";
|
|
660
|
-
readonly TRANSFORM_UNKNOWN_OP: "
|
|
662
|
+
readonly TRANSFORM_UNKNOWN_OP: "lowering";
|
|
661
663
|
readonly TRANSFORM_VARIANT_ONE_OP: "lint";
|
|
662
664
|
readonly TRANSFORM_VARIANT_OP_MISMATCH: "lint";
|
|
663
665
|
readonly TRANSFORM_VARIANT_UNKNOWN: "lowering";
|
package/dist/core/refusals.js
CHANGED
|
@@ -46,21 +46,21 @@ import { ownEntry } from './own-entry.js';
|
|
|
46
46
|
* code means the same condition in each.
|
|
47
47
|
*/
|
|
48
48
|
export const REFUSALS = {
|
|
49
|
-
ACTION_FIELD_UNKNOWN_KEY: '
|
|
49
|
+
ACTION_FIELD_UNKNOWN_KEY: 'lowering',
|
|
50
50
|
AGENTIC_EMPTY_RETURNS: 'lint',
|
|
51
51
|
AGENTIC_KEY_NOT_KEY: 'lint',
|
|
52
52
|
AGENTIC_LOCAL_FORM_UNVERIFIED: 'lint',
|
|
53
|
-
AGENTIC_LOCAL_HAS_FOLDER: '
|
|
53
|
+
AGENTIC_LOCAL_HAS_FOLDER: 'lowering',
|
|
54
54
|
AGENTIC_LOCAL_NO_PROJECT_ID: 'lint',
|
|
55
55
|
AGENTIC_LOCAL_PROJECT_ID_NOT_GUID: 'lint',
|
|
56
56
|
AGENTIC_NAME_IS_PATH: 'lint',
|
|
57
57
|
AGENTIC_NO_FOLDER: 'lint',
|
|
58
|
-
AGENTIC_NO_KEY: '
|
|
58
|
+
AGENTIC_NO_KEY: 'lowering',
|
|
59
59
|
AGENTIC_NO_NAME: 'lint',
|
|
60
60
|
AGENTIC_READ_NOT_OUTPUT: 'lint',
|
|
61
61
|
AGENTIC_READ_UNKNOWN_FIELD: 'lint',
|
|
62
62
|
AGENTIC_READ_WITHOUT_RETURNS: 'lint',
|
|
63
|
-
AGENTIC_RESERVED_INPUT: '
|
|
63
|
+
AGENTIC_RESERVED_INPUT: 'lowering',
|
|
64
64
|
AGENT_CONTEXT_NO_FOLDER_PATH: 'lint',
|
|
65
65
|
AGENT_CONTEXT_NO_ID: 'lowering',
|
|
66
66
|
AGENT_CONTEXT_QUERY_NOT_EXPRESSION: 'lint',
|
|
@@ -73,7 +73,7 @@ export const REFUSALS = {
|
|
|
73
73
|
AGENT_MEMORY_VERSION_NO_HANDLE: 'lowering',
|
|
74
74
|
AGENT_NAME_IS_PATH: 'lint',
|
|
75
75
|
AGENT_NO_FOLDER: 'lint',
|
|
76
|
-
AGENT_NO_KEY: '
|
|
76
|
+
AGENT_NO_KEY: 'lowering',
|
|
77
77
|
AGENT_NO_NAME: 'lint',
|
|
78
78
|
AGENT_READ_NOT_OUTPUT: 'lint',
|
|
79
79
|
AGENT_READ_UNKNOWN_FIELD: 'lint',
|
|
@@ -83,7 +83,7 @@ export const REFUSALS = {
|
|
|
83
83
|
APIWF_KEY_NOT_KEY: 'lint',
|
|
84
84
|
APIWF_NAME_IS_PATH: 'lint',
|
|
85
85
|
APIWF_NO_FOLDER: 'lint',
|
|
86
|
-
APIWF_NO_KEY: '
|
|
86
|
+
APIWF_NO_KEY: 'lowering',
|
|
87
87
|
APIWF_NO_NAME: 'lint',
|
|
88
88
|
APIWF_READ_NOT_OUTPUT: 'lint',
|
|
89
89
|
APIWF_READ_UNKNOWN_FIELD: 'lint',
|
|
@@ -147,6 +147,7 @@ export const REFUSALS = {
|
|
|
147
147
|
BPMN_HUMAN_TASK_APP_XOR_FORM: 'lowering',
|
|
148
148
|
BPMN_JSON_INPUT_CDATA_END: 'lowering',
|
|
149
149
|
BPMN_NO_DEFAULT_EXPORT: 'lowering',
|
|
150
|
+
BPMN_NO_ID: 'lowering',
|
|
150
151
|
BPMN_OUTPUT_VAR_NO_OUTPUT_ROW: 'lowering',
|
|
151
152
|
BPMN_PATH_ALREADY_LEFT: 'lowering',
|
|
152
153
|
BPMN_PATH_NOT_CONTINUED: 'lowering',
|
|
@@ -201,7 +202,7 @@ export const REFUSALS = {
|
|
|
201
202
|
CONNECTION_STUB: 'lint',
|
|
202
203
|
CONNECTOR_IMPORT_NOT_A_FILE: 'lowering',
|
|
203
204
|
CONNECTOR_INPUT: 'lowering',
|
|
204
|
-
CONNECTOR_INPUTS_SHADOWED: '
|
|
205
|
+
CONNECTOR_INPUTS_SHADOWED: 'lowering',
|
|
205
206
|
CONNECTOR_INPUT_MISSING: 'draft',
|
|
206
207
|
CONNECTOR_INPUT_ROW_NO_TARGET: 'lint',
|
|
207
208
|
CONNECTOR_INPUT_ROW_TARGET_UNKNOWN: 'lint',
|
|
@@ -259,12 +260,12 @@ export const REFUSALS = {
|
|
|
259
260
|
DOC_NO_FILEREF: 'lint',
|
|
260
261
|
DOWHILE_CONST_COND: 'lint',
|
|
261
262
|
DOWHILE_LIMIT: 'lint',
|
|
262
|
-
DUPLICATE_DOCUMENT_ID: '
|
|
263
|
+
DUPLICATE_DOCUMENT_ID: 'lowering',
|
|
263
264
|
DUP_BUSINESS_EVENT: 'lowering',
|
|
264
265
|
DUP_CASE: 'lint',
|
|
265
266
|
DUP_END_NAME: 'lowering',
|
|
266
267
|
DUP_EXIT_RULE: 'lint',
|
|
267
|
-
DUP_ID: '
|
|
268
|
+
DUP_ID: 'lowering',
|
|
268
269
|
DUP_RULE_NAME: 'lint',
|
|
269
270
|
DUP_STAGE: 'lowering',
|
|
270
271
|
DUP_STEP: 'lowering',
|
|
@@ -300,6 +301,7 @@ export const REFUSALS = {
|
|
|
300
301
|
EVENT_SCOPE_NOT_TAKEN: 'lint',
|
|
301
302
|
EVENT_UNKNOWN: 'lowering',
|
|
302
303
|
EVENT_UNPREPARED: 'lint',
|
|
304
|
+
EVENT_WHERE_NOT_SCALAR: 'lowering',
|
|
303
305
|
EXCEPTION_STAGE_REQUIRED: 'lint',
|
|
304
306
|
EXPR_BARE_VAR_REF: 'lowering',
|
|
305
307
|
EXPR_SYNTAX: 'lowering',
|
|
@@ -327,12 +329,12 @@ export const REFUSALS = {
|
|
|
327
329
|
FORM_TRIGGER_NO_INPUTS: 'lint',
|
|
328
330
|
FUNCTION_EMPTY_RETURNS: 'lint',
|
|
329
331
|
FUNCTION_KEY_NOT_KEY: 'lint',
|
|
330
|
-
FUNCTION_LOCAL_HAS_FOLDER: '
|
|
332
|
+
FUNCTION_LOCAL_HAS_FOLDER: 'lowering',
|
|
331
333
|
FUNCTION_LOCAL_NO_PROJECT_ID: 'lint',
|
|
332
334
|
FUNCTION_LOCAL_PROJECT_ID_NOT_GUID: 'lint',
|
|
333
335
|
FUNCTION_NAME_IS_PATH: 'lint',
|
|
334
336
|
FUNCTION_NO_FOLDER: 'lint',
|
|
335
|
-
FUNCTION_NO_KEY: '
|
|
337
|
+
FUNCTION_NO_KEY: 'lowering',
|
|
336
338
|
FUNCTION_NO_NAME: 'lint',
|
|
337
339
|
FUNCTION_READ_NOT_OUTPUT: 'lint',
|
|
338
340
|
FUNCTION_READ_UNKNOWN_FIELD: 'lint',
|
|
@@ -550,7 +552,7 @@ export const REFUSALS = {
|
|
|
550
552
|
QUEUE_BAD_PRIORITY: 'lint',
|
|
551
553
|
QUEUE_ITEM_EXPR_UNSUPPORTED: 'lowering',
|
|
552
554
|
QUEUE_ITEM_FIELD_NOT_PRIMITIVE: 'lint',
|
|
553
|
-
QUEUE_ITEM_NOT_OBJECT: '
|
|
555
|
+
QUEUE_ITEM_NOT_OBJECT: 'lowering',
|
|
554
556
|
QUEUE_KEY_NOT_GUID: 'lint',
|
|
555
557
|
QUEUE_NO_FOLDER: 'lint',
|
|
556
558
|
QUEUE_NO_ITEM: 'lint',
|
|
@@ -559,7 +561,7 @@ export const REFUSALS = {
|
|
|
559
561
|
QUEUE_READ_NOT_OUTPUT: 'lint',
|
|
560
562
|
QUEUE_READ_UNKNOWN_FIELD: 'lint',
|
|
561
563
|
QUEUE_READ_WITHOUT_RETURNS: 'lint',
|
|
562
|
-
QUEUE_RETURNS_WITHOUT_WAIT: '
|
|
564
|
+
QUEUE_RETURNS_WITHOUT_WAIT: 'lowering',
|
|
563
565
|
RAW_NODE_CONNECTOR: 'lowering',
|
|
564
566
|
RAW_NODE_TYPED_FAMILY: 'lint',
|
|
565
567
|
RAW_NODE_UNKNOWN_INPUT: 'lowering',
|
|
@@ -581,12 +583,12 @@ export const REFUSALS = {
|
|
|
581
583
|
RETRY_INVALID_DURATION: 'lint',
|
|
582
584
|
RETURN_UPDATES_SAME_VAR: 'lowering',
|
|
583
585
|
RPA_KEY_NOT_KEY: 'lint',
|
|
584
|
-
RPA_LOCAL_HAS_FOLDER: '
|
|
586
|
+
RPA_LOCAL_HAS_FOLDER: 'lowering',
|
|
585
587
|
RPA_LOCAL_NO_PROJECT_ID: 'lint',
|
|
586
588
|
RPA_LOCAL_PROJECT_ID_NOT_GUID: 'lint',
|
|
587
589
|
RPA_NAME_IS_PATH: 'lint',
|
|
588
590
|
RPA_NO_FOLDER: 'lint',
|
|
589
|
-
RPA_NO_KEY: '
|
|
591
|
+
RPA_NO_KEY: 'lowering',
|
|
590
592
|
RPA_NO_NAME: 'lint',
|
|
591
593
|
RPA_READ_NOT_OUTPUT: 'lint',
|
|
592
594
|
RPA_READ_UNKNOWN_FIELD: 'lint',
|
|
@@ -654,8 +656,8 @@ export const REFUSALS = {
|
|
|
654
656
|
SUBFLOW_UNKNOWN_INPUT: 'lint',
|
|
655
657
|
SUBFLOW_UNKNOWN_OUTPUT: 'lint',
|
|
656
658
|
SUPERFLUOUS_GATEWAY: 'lint',
|
|
657
|
-
SWITCH_CASE_FORM: '
|
|
658
|
-
SWITCH_CASE_ID: '
|
|
659
|
+
SWITCH_CASE_FORM: 'lowering',
|
|
660
|
+
SWITCH_CASE_ID: 'lowering',
|
|
659
661
|
SWITCH_CASE_TYPE_MISMATCH: 'lint',
|
|
660
662
|
SWITCH_CONST_ON: 'lint',
|
|
661
663
|
SWITCH_CONST_WHEN: 'lint',
|
|
@@ -681,13 +683,13 @@ export const REFUSALS = {
|
|
|
681
683
|
TIMER_DURATION_INVALID: 'lint',
|
|
682
684
|
TIMER_DURATION_NOT_RUNTIME_PARSEABLE: 'lint',
|
|
683
685
|
TIMER_MISSING_FIELD: 'lint',
|
|
684
|
-
TIMER_VALUE_REQUIRED: '
|
|
686
|
+
TIMER_VALUE_REQUIRED: 'lowering',
|
|
685
687
|
TRANSFORM_AGG_NO_ALIAS: 'lint',
|
|
686
688
|
TRANSFORM_AGG_NO_FIELD: 'lint',
|
|
687
689
|
TRANSFORM_BAD_VOCAB: 'lint',
|
|
688
|
-
TRANSFORM_COLLECTION_LITERAL: '
|
|
690
|
+
TRANSFORM_COLLECTION_LITERAL: 'lowering',
|
|
689
691
|
TRANSFORM_COLLECTION_NOT_PATH: 'lint',
|
|
690
|
-
TRANSFORM_COLLECTION_NOT_REF: '
|
|
692
|
+
TRANSFORM_COLLECTION_NOT_REF: 'lowering',
|
|
691
693
|
TRANSFORM_COLLECTION_SCALAR: 'lint',
|
|
692
694
|
TRANSFORM_CONTAINS_ARRAY_VALUE: 'lint',
|
|
693
695
|
TRANSFORM_EMPTY_FILTER: 'lint',
|
|
@@ -695,10 +697,10 @@ export const REFUSALS = {
|
|
|
695
697
|
TRANSFORM_FILTER_NO_FIELD: 'lint',
|
|
696
698
|
TRANSFORM_FILTER_VALUE_EXPR: 'lint',
|
|
697
699
|
TRANSFORM_MAP_NO_FIELD: 'lint',
|
|
698
|
-
TRANSFORM_NO_COLLECTION: '
|
|
700
|
+
TRANSFORM_NO_COLLECTION: 'lowering',
|
|
699
701
|
TRANSFORM_NO_GROUP_FIELD: 'lint',
|
|
700
702
|
TRANSFORM_NO_OPERATIONS: 'lint',
|
|
701
|
-
TRANSFORM_UNKNOWN_OP: '
|
|
703
|
+
TRANSFORM_UNKNOWN_OP: 'lowering',
|
|
702
704
|
TRANSFORM_VARIANT_ONE_OP: 'lint',
|
|
703
705
|
TRANSFORM_VARIANT_OP_MISMATCH: 'lint',
|
|
704
706
|
TRANSFORM_VARIANT_UNKNOWN: 'lowering',
|
|
@@ -9,7 +9,7 @@ import { jsonClone } from '../../../core/json-clone.js';
|
|
|
9
9
|
import { subNodeId } from '../../../core/node-id-placeholder.js';
|
|
10
10
|
import { synthesizedDefinitionRefusal } from '../../../core/synthesized-definition.js';
|
|
11
11
|
import { tsLiteral, tsObject } from '../../../core/ts-literal.js';
|
|
12
|
-
import { CompileRefusal } from '../../../core/compile-refusal.js';
|
|
12
|
+
import { CompileRefusal, LibraryRequiredRefusal } from '../../../core/compile-refusal.js';
|
|
13
13
|
const CONNECTOR_PREFIX = 'uipath.connector.';
|
|
14
14
|
/** `<key>.<action>` after the prefix, split on the last dot; undefined for an event, a trigger, or a name with no action. */
|
|
15
15
|
function splitOperation(typeName) {
|
|
@@ -74,9 +74,11 @@ function serializeConnector(spec, ctx) {
|
|
|
74
74
|
const missing = missingBindingLabels(spec);
|
|
75
75
|
if (missing.length > 0 && !ctx.drafting)
|
|
76
76
|
throw new BindingRefusal('BINDING_MISSING', bindingMissingMessage(where, missing, target));
|
|
77
|
-
ctx.resolveBinding(spec.connection, 'connection', where, target);
|
|
77
|
+
const connection = ctx.resolveBinding(spec.connection, 'connection', where, target);
|
|
78
78
|
ctx.resolveBinding(spec.folder, 'folder', where, target);
|
|
79
|
-
|
|
79
|
+
// The connection rides on the refusal, so check's stand-in for this step
|
|
80
|
+
// still takes part in the file-wide CONNECTION_CONNECTOR_CONFLICT rule.
|
|
81
|
+
throw new LibraryRequiredRefusal(`connector "${step}" needs a library (pass --library / set $FLOW_SDK_LIBRARY_JSON).`, connection !== undefined && typeof spec.key === 'string' && spec.key !== '' ? { connector: spec.key, connection } : undefined);
|
|
80
82
|
}
|
|
81
83
|
// The library's refusals (the operation, its fields) name the connector, not
|
|
82
84
|
// the step: they say which step as `check` always has.
|