@uipath/maestro-builder-sdk 6.57.0 → 6.58.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/subscription.d.ts +4 -2
- package/dist/case/subscription.js +5 -2
- package/dist/core/actions.js +2 -2
- package/dist/core/binding-messages.d.ts +2 -1
- package/dist/core/binding-messages.js +3 -4
- package/dist/core/byoa.d.ts +3 -2
- package/dist/core/byoa.js +3 -3
- package/dist/core/carried-definitions.d.ts +0 -18
- package/dist/core/carried-definitions.js +3 -2
- package/dist/core/ceql.d.ts +2 -1
- package/dist/core/ceql.js +3 -2
- package/dist/core/compile-refusal.d.ts +21 -0
- package/dist/core/compile-refusal.js +26 -0
- package/dist/core/connector-inputs.js +2 -1
- package/dist/core/connector-resolve-error.d.ts +2 -1
- package/dist/core/connector-resolve-error.js +3 -4
- package/dist/core/connectors.js +2 -1
- package/dist/core/event-filters.js +2 -1
- package/dist/core/hitl-routing.d.ts +7 -82
- package/dist/core/hitl-routing.js +95 -6
- package/dist/core/library.js +4 -3
- package/dist/core/lookups.js +6 -5
- package/dist/core/nodes/registry.js +3 -2
- package/dist/core/nodes/versioned.js +3 -2
- package/dist/core/process-resource-sort-order.js +1 -1
- package/dist/core/read-text.d.ts +0 -28
- package/dist/core/read-text.js +3 -2
- package/dist/core/refusals.d.ts +465 -0
- package/dist/core/refusals.js +504 -0
- package/dist/core/script-function.js +2 -1
- package/dist/core/typescript-module.js +2 -1
- package/dist/flow-expr-check.d.ts +2 -1
- package/dist/flow-expr-check.js +4 -2
- package/dist/flow-sdk.js +17 -16
- package/dist/flow-step-tree.js +1 -1
- package/dist/flow-variables.js +3 -2
- package/dist/load.js +7 -6
- package/dist/nodes/agent/flow/inline-agent.js +7 -6
- package/dist/nodes/connector/flow/node-type.js +2 -1
- package/dist/nodes/data-fabric/flow/factories.js +2 -1
- package/dist/nodes/data-fabric/flow/verbs.js +2 -1
- package/dist/nodes/delay/flow/factories.js +2 -1
- package/dist/nodes/document/flow/ixp.js +5 -1
- package/dist/nodes/hitl/flow/check.js +4 -2
- package/dist/nodes/hitl/flow/node-type.js +6 -5
- package/dist/nodes/http/flow/factories.js +2 -1
- package/dist/nodes/http/flow/node-type.js +6 -5
- package/dist/nodes/process/flow/factories.js +2 -1
- package/dist/nodes/queue/flow/node-type.js +3 -2
- package/dist/nodes/transform/flow/node-type.js +2 -1
- package/dist/raw-node.js +3 -2
- package/dist/ref-resolve.d.ts +0 -36
- package/dist/ref-resolve.js +9 -8
- package/dist/schema-version.d.ts +0 -38
- package/dist/schema-version.js +3 -2
- package/dist/sdk-resolve.js +2 -1
- package/dist/serialize.d.ts +5 -2
- package/dist/serialize.js +115 -83
- package/package.json +2 -2
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every diagnostic and refusal code the Flow compile path emits, with its class
|
|
3
|
+
* (docs/CHECK_COMPILE_CONTRACT_DESIGN.md §3.1, #1440):
|
|
4
|
+
*
|
|
5
|
+
* - `lint`: the flow is probably wrong. Only `check` reports it; it never
|
|
6
|
+
* stops `compile` from writing. A serializer warning (`CONNECTION_STUB`) is
|
|
7
|
+
* `lint` too: it never blocks.
|
|
8
|
+
* - `lowering`: `compile` cannot write a correct `.flow`. It always stops
|
|
9
|
+
* `compile`; `check` may report it early.
|
|
10
|
+
* - `draft`: an unfinished canvas node (no connection yet, a required input
|
|
11
|
+
* left empty, a generic operation with no object). These are the codes a
|
|
12
|
+
* draft-tolerant compile collects instead of throwing (`DraftCode` in
|
|
13
|
+
* `serialize.ts`).
|
|
14
|
+
*
|
|
15
|
+
* A class describes the code's ERROR-level emission. A code `check` sometimes
|
|
16
|
+
* reports as a warning (`RAW_NODE_UNKNOWN_INPUT` at a version the SDK does not
|
|
17
|
+
* bundle) never blocks there; a warning never does. A code names ONE
|
|
18
|
+
* condition: when `check` and the serializer report different conditions,
|
|
19
|
+
* they get different codes, so one code never both stops compile and lets it
|
|
20
|
+
* write.
|
|
21
|
+
*
|
|
22
|
+
* The classes record what each code does as it is emitted today. A code that
|
|
23
|
+
* names a condition compile refuses through a still-uncoded throw is `lint`
|
|
24
|
+
* until the slice that codes that throw moves it to `lowering`. Any other move
|
|
25
|
+
* between classes is a behaviour change with its own review (the design doc's
|
|
26
|
+
* §7).
|
|
27
|
+
*
|
|
28
|
+
* Naming, for a new code: the family or concern first (`CONNECTOR_`, `BINDING_`,
|
|
29
|
+
* `EVENT_`, `HITL_`, a node type's `codePrefix` such as `QUEUE_` or `RPA_`),
|
|
30
|
+
* then what is wrong (`_NO_FOLDER`, `_NOT_GUID`, `_UNKNOWN_FIELD`). `DUP_` is a
|
|
31
|
+
* duplicate name.
|
|
32
|
+
*
|
|
33
|
+
* FB017 (`tests/lint/rules/fb017-coded-refusals.ts`) keeps this table and the
|
|
34
|
+
* source in step: every code-shaped string literal in the Flow compile path is
|
|
35
|
+
* a key here, and every key is emitted somewhere. The `<PREFIX>_READ_*` codes
|
|
36
|
+
* of the `codePrefix` node types are composed at run time (`check.ts`
|
|
37
|
+
* `checkDeclaredOutputRead`), so they appear here but not as literals.
|
|
38
|
+
*/
|
|
39
|
+
import { ownEntry } from './own-entry.js';
|
|
40
|
+
/** Every code the Flow compile path emits → its class. Sorted by code. */
|
|
41
|
+
export const REFUSALS = {
|
|
42
|
+
AGENTIC_EMPTY_RETURNS: 'lint',
|
|
43
|
+
AGENTIC_KEY_NOT_KEY: 'lint',
|
|
44
|
+
AGENTIC_LOCAL_FORM_UNVERIFIED: 'lint',
|
|
45
|
+
AGENTIC_LOCAL_HAS_FOLDER: 'lint',
|
|
46
|
+
AGENTIC_LOCAL_NO_PROJECT_ID: 'lint',
|
|
47
|
+
AGENTIC_LOCAL_PROJECT_ID_NOT_GUID: 'lint',
|
|
48
|
+
AGENTIC_NAME_IS_PATH: 'lint',
|
|
49
|
+
AGENTIC_NO_FOLDER: 'lint',
|
|
50
|
+
AGENTIC_NO_KEY: 'lint',
|
|
51
|
+
AGENTIC_NO_NAME: 'lint',
|
|
52
|
+
AGENTIC_READ_NOT_OUTPUT: 'lint',
|
|
53
|
+
AGENTIC_READ_UNKNOWN_FIELD: 'lint',
|
|
54
|
+
AGENTIC_READ_WITHOUT_RETURNS: 'lint',
|
|
55
|
+
AGENTIC_RESERVED_INPUT: 'lint',
|
|
56
|
+
AGENT_CONTEXT_NO_FOLDER_PATH: 'lint',
|
|
57
|
+
AGENT_CONTEXT_NO_ID: 'lowering',
|
|
58
|
+
AGENT_CONTEXT_QUERY_NOT_EXPRESSION: 'lint',
|
|
59
|
+
AGENT_EMPTY_INPUT_FLOOR: 'lint',
|
|
60
|
+
AGENT_EMPTY_RETURNS: 'lint',
|
|
61
|
+
AGENT_KEY_NOT_GUID: 'lint',
|
|
62
|
+
AGENT_LOCAL_NO_PROJECT_ID: 'lint',
|
|
63
|
+
AGENT_LOCAL_PROJECT_ID_NOT_GUID: 'lint',
|
|
64
|
+
AGENT_MEMORY_NOT_AUTHORABLE: 'lint',
|
|
65
|
+
AGENT_MEMORY_VERSION_NO_HANDLE: 'lowering',
|
|
66
|
+
AGENT_NAME_IS_PATH: 'lint',
|
|
67
|
+
AGENT_NO_FOLDER: 'lint',
|
|
68
|
+
AGENT_NO_KEY: 'lint',
|
|
69
|
+
AGENT_NO_NAME: 'lint',
|
|
70
|
+
AGENT_READ_NOT_OUTPUT: 'lint',
|
|
71
|
+
AGENT_READ_UNKNOWN_FIELD: 'lint',
|
|
72
|
+
AGENT_READ_WITHOUT_RETURNS: 'lint',
|
|
73
|
+
AGENT_READ_WRONG_CASE: 'lint',
|
|
74
|
+
APIWF_EMPTY_RETURNS: 'lint',
|
|
75
|
+
APIWF_KEY_NOT_KEY: 'lint',
|
|
76
|
+
APIWF_NAME_IS_PATH: 'lint',
|
|
77
|
+
APIWF_NO_FOLDER: 'lint',
|
|
78
|
+
APIWF_NO_KEY: 'lint',
|
|
79
|
+
APIWF_NO_NAME: 'lint',
|
|
80
|
+
APIWF_READ_NOT_OUTPUT: 'lint',
|
|
81
|
+
APIWF_READ_UNKNOWN_FIELD: 'lint',
|
|
82
|
+
APIWF_READ_WITHOUT_RETURNS: 'lint',
|
|
83
|
+
ARM_SCOPED_OUTPUT_READ: 'lint',
|
|
84
|
+
BINDING_MISSING: 'draft',
|
|
85
|
+
BINDING_PLACEHOLDER_UNRESOLVED: 'draft',
|
|
86
|
+
BINDING_SELF_NAME: 'draft',
|
|
87
|
+
BINDING_UNDECLARED: 'draft',
|
|
88
|
+
BRANCH_CONST_COND: 'lint',
|
|
89
|
+
BREAK_OUTSIDE_LOOP: 'lowering',
|
|
90
|
+
CALL_NO_NUMBER: 'lint',
|
|
91
|
+
CALL_NUMBER_NOT_E164: 'lint',
|
|
92
|
+
CARRIED_DEFINITION_CONFLICT: 'lowering',
|
|
93
|
+
CARRIED_DEFINITION_INVALID: 'lowering',
|
|
94
|
+
CEQL_UNPARSEABLE: 'lowering',
|
|
95
|
+
CONNECTION_CONNECTOR_CONFLICT: 'draft',
|
|
96
|
+
CONNECTION_STUB: 'lint',
|
|
97
|
+
CONNECTOR_IMPORT_NOT_A_FILE: 'lowering',
|
|
98
|
+
CONNECTOR_INPUT: 'lowering',
|
|
99
|
+
CONNECTOR_INPUT_MISSING: 'draft',
|
|
100
|
+
CONNECTOR_LIBRARY_ENTRY_UNREADABLE: 'lowering',
|
|
101
|
+
CONNECTOR_NODE_TYPE_INVALID: 'lowering',
|
|
102
|
+
CONNECTOR_NOT_IN_LIBRARY: 'lowering',
|
|
103
|
+
CONNECTOR_NO_FLOW_DEFINITION: 'lowering',
|
|
104
|
+
CONNECTOR_OBJECT_NOT_GENERIC: 'lowering',
|
|
105
|
+
CONNECTOR_OBJECT_REQUIRED: 'draft',
|
|
106
|
+
CONNECTOR_RESOLVE_FAILED: 'lowering',
|
|
107
|
+
CONTINUE_OUTSIDE_LOOP: 'lowering',
|
|
108
|
+
CONTRIBUTION_BINDING_UNRESOLVED: 'draft',
|
|
109
|
+
CONTRIBUTION_INVALID: 'lowering',
|
|
110
|
+
CONVERSATION_NO_ID: 'lint',
|
|
111
|
+
CONVERSATION_RANGE: 'lint',
|
|
112
|
+
CONV_AGENT_CUSTOM_NO_ID: 'lint',
|
|
113
|
+
CONV_AGENT_NO_MODEL: 'lint',
|
|
114
|
+
CONV_AGENT_NO_PROMPT: 'lint',
|
|
115
|
+
CONV_AGENT_NO_TURN: 'lint',
|
|
116
|
+
CONV_AGENT_SETTINGS_MODE: 'lint',
|
|
117
|
+
CUSTOM_FIELDS_UNPREPARED: 'lint',
|
|
118
|
+
DATAFABRIC_DELETE_HAS_NO_OUTPUT: 'lint',
|
|
119
|
+
DATAFABRIC_EMPTY_SET: 'lint',
|
|
120
|
+
DATAFABRIC_EMPTY_VALUES: 'lint',
|
|
121
|
+
DATAFABRIC_FILTER_BLANK_VALUE: 'lint',
|
|
122
|
+
DATAFABRIC_FOLDER_NO_RESOURCE_KEY: 'lint',
|
|
123
|
+
DATAFABRIC_FROMREAD_MULTIPLE: 'lint',
|
|
124
|
+
DATAFABRIC_FROMREAD_UNKNOWN: 'lint',
|
|
125
|
+
DATAFABRIC_IN_REQUIRES_MULTIPLE: 'lint',
|
|
126
|
+
DATAFABRIC_LIMIT_RANGE: 'lint',
|
|
127
|
+
DATAFABRIC_NO_ENTITY: 'lint',
|
|
128
|
+
DATAFABRIC_QUERY_OPTS_WITHOUT_MULTIPLE: 'lint',
|
|
129
|
+
DATAFABRIC_RECORD_REF: 'lowering',
|
|
130
|
+
DATAFABRIC_RESOURCE_KEY_NO_FOLDER: 'lint',
|
|
131
|
+
DATAFABRIC_RESULT_MODE_VERSION: 'lowering',
|
|
132
|
+
DATAFABRIC_SYSTEM_COLUMN: 'lint',
|
|
133
|
+
DECLARATION_SHAPE: 'lowering',
|
|
134
|
+
DECLARATION_TYPE_UNKNOWN: 'lowering',
|
|
135
|
+
DECOMPILE_NOT_A_NUMBER: 'lowering',
|
|
136
|
+
DECOMPILE_VARIABLES_SHAPE: 'lowering',
|
|
137
|
+
DELAY_CALENDAR: 'lint',
|
|
138
|
+
DELAY_DURATION_XOR_UNTIL: 'lowering',
|
|
139
|
+
DELAY_HAS_NO_OUTPUT: 'lint',
|
|
140
|
+
DELAY_NOT_ISO: 'lint',
|
|
141
|
+
DELAY_NO_DURATION: 'lint',
|
|
142
|
+
DELAY_UNTIL_NOT_ISO: 'lint',
|
|
143
|
+
DELAY_ZERO: 'lint',
|
|
144
|
+
DOCVAL_NO_EXTRACTION: 'lint',
|
|
145
|
+
DOCVAL_RENDER_UNKNOWN: 'lint',
|
|
146
|
+
DOCVAL_TAXONOMY_REQUIRED: 'lint',
|
|
147
|
+
DOC_NO_FILEREF: 'lint',
|
|
148
|
+
DOWHILE_CONST_COND: 'lint',
|
|
149
|
+
DOWHILE_LIMIT: 'lint',
|
|
150
|
+
DUP_CASE: 'lint',
|
|
151
|
+
DUP_END_NAME: 'lowering',
|
|
152
|
+
DUP_STEP: 'lowering',
|
|
153
|
+
EMPTY_ARM: 'lint',
|
|
154
|
+
EMPTY_LOOP: 'lint',
|
|
155
|
+
ENTRY_POINT_DUP_ID: 'lowering',
|
|
156
|
+
ENTRY_POINT_INPUT_COLLISION: 'lint',
|
|
157
|
+
ENTRY_POINT_NO_SHARED_BODY: 'lowering',
|
|
158
|
+
ERROR_ENVELOPE_VIA_OUTPUT: 'lint',
|
|
159
|
+
ERROR_FIELD_UNDECLARED: 'lint',
|
|
160
|
+
ERROR_READ_OUTSIDE_HANDLER: 'lowering',
|
|
161
|
+
ERROR_READ_VIA_OUT: 'lint',
|
|
162
|
+
EVENT_BYOA_UNVERIFIED: 'lowering',
|
|
163
|
+
EVENT_FILTERS_NOT_ARRAY: 'lint',
|
|
164
|
+
EVENT_FILTER_BACKSLASH: 'lowering',
|
|
165
|
+
EVENT_FILTER_BAD_VALUE: 'lowering',
|
|
166
|
+
EVENT_FILTER_MANY_OPERATORS: 'lowering',
|
|
167
|
+
EVENT_FILTER_NO_FIELD: 'lowering',
|
|
168
|
+
EVENT_FILTER_NO_VALUE: 'lowering',
|
|
169
|
+
EVENT_FILTER_UNKNOWN_FIELD: 'lint',
|
|
170
|
+
EVENT_GENERIC_NO_OBJECT: 'lowering',
|
|
171
|
+
EVENT_NO_CONNECTOR: 'lint',
|
|
172
|
+
EVENT_NO_EVENT: 'lint',
|
|
173
|
+
EVENT_NO_SCOPE: 'lint',
|
|
174
|
+
EVENT_NO_SUBSCRIPTION: 'lint',
|
|
175
|
+
EVENT_OBJECT_NOT_GENERIC: 'lint',
|
|
176
|
+
EVENT_SCOPE_NOT_TAKEN: 'lint',
|
|
177
|
+
EVENT_UNKNOWN: 'lowering',
|
|
178
|
+
EVENT_UNPREPARED: 'lint',
|
|
179
|
+
EXPR_SYNTAX: 'lowering',
|
|
180
|
+
EXPR_UNDECLARED_REF: 'lowering',
|
|
181
|
+
EXTRACT_SCHEMA_SHAPE: 'lint',
|
|
182
|
+
FILE_NOT_FOUND: 'lowering',
|
|
183
|
+
FIRE_AND_FORGET_READ: 'lint',
|
|
184
|
+
FIRE_AND_FORGET_RETURNS: 'lowering',
|
|
185
|
+
FLOW_EXPORT_NOT_BUILT: 'lowering',
|
|
186
|
+
FLOW_NO_DEFAULT_EXPORT: 'lowering',
|
|
187
|
+
FLOW_SOURCE_NOT_FOUND: 'lowering',
|
|
188
|
+
FORM_TRIGGER_NO_INPUTS: 'lint',
|
|
189
|
+
FUNCTION_EMPTY_RETURNS: 'lint',
|
|
190
|
+
FUNCTION_KEY_NOT_KEY: 'lint',
|
|
191
|
+
FUNCTION_NAME_IS_PATH: 'lint',
|
|
192
|
+
FUNCTION_NO_FOLDER: 'lint',
|
|
193
|
+
FUNCTION_NO_KEY: 'lint',
|
|
194
|
+
FUNCTION_NO_NAME: 'lint',
|
|
195
|
+
FUNCTION_READ_NOT_OUTPUT: 'lint',
|
|
196
|
+
FUNCTION_READ_UNKNOWN_FIELD: 'lint',
|
|
197
|
+
FUNCTION_READ_WITHOUT_RETURNS: 'lint',
|
|
198
|
+
GUARDRAIL_ACTION_UNKNOWN: 'lint',
|
|
199
|
+
GUARDRAIL_DUP_ID: 'lint',
|
|
200
|
+
GUARDRAIL_INCOMPLETE: 'lint',
|
|
201
|
+
GUARDRAIL_NO_RULES: 'lint',
|
|
202
|
+
GUARDRAIL_NO_SCOPE: 'lint',
|
|
203
|
+
GUARDRAIL_NO_VALIDATOR: 'lint',
|
|
204
|
+
GUARDRAIL_TYPE_UNKNOWN: 'lint',
|
|
205
|
+
HITL_APP_INCOMPLETE: 'lint',
|
|
206
|
+
HITL_APP_MISSING: 'lint',
|
|
207
|
+
HITL_APP_WITHOUT_VARIANT: 'lint',
|
|
208
|
+
HITL_APP_WITH_FIELDS: 'lint',
|
|
209
|
+
HITL_CHANNEL_UNKNOWN: 'lint',
|
|
210
|
+
HITL_COMPLETED_PORT_GONE: 'lowering',
|
|
211
|
+
HITL_DOCUMENT_WITHOUT_VARIANT: 'lint',
|
|
212
|
+
HITL_DOCVAL_NO_DOCUMENT: 'lint',
|
|
213
|
+
HITL_DOCVAL_WITH_FIELDS: 'lint',
|
|
214
|
+
HITL_DUP_FIELD: 'lint',
|
|
215
|
+
HITL_DUP_OUTCOME: 'lint',
|
|
216
|
+
HITL_DUP_OUTCOME_ID: 'lint',
|
|
217
|
+
HITL_END_OUTCOME_IN_PARALLEL: 'lowering',
|
|
218
|
+
HITL_EXPOSE_ERROR_VERSION: 'lowering',
|
|
219
|
+
HITL_FAN_OUT_INTO_JOIN: 'lowering',
|
|
220
|
+
HITL_FIELD_DIRECTION: 'lint',
|
|
221
|
+
HITL_FIELD_NO_ID: 'lint',
|
|
222
|
+
HITL_FIELD_NO_VALUE: 'lint',
|
|
223
|
+
HITL_FIELD_OPTIONS: 'lint',
|
|
224
|
+
HITL_FIELD_OPTIONS_IGNORED: 'lint',
|
|
225
|
+
HITL_FIELD_RESERVED_ID: 'lint',
|
|
226
|
+
HITL_FIELD_SETTING_INVALID: 'lint',
|
|
227
|
+
HITL_FIELD_TYPE_UNKNOWN: 'lint',
|
|
228
|
+
HITL_FIELD_VALUE_NOT_PATH: 'lint',
|
|
229
|
+
HITL_FIELD_VALUE_NOT_REF: 'lint',
|
|
230
|
+
HITL_FIELD_VARIABLE: 'lint',
|
|
231
|
+
HITL_LEGACY_COMPLETED: 'lint',
|
|
232
|
+
HITL_LEGACY_COMPLETED_CONFLICT: 'lowering',
|
|
233
|
+
HITL_LEGACY_COMPLETED_NO_EFFECT: 'lint',
|
|
234
|
+
HITL_LEGACY_COMPLETED_VERSION: 'lowering',
|
|
235
|
+
HITL_NO_FIELDS: 'lint',
|
|
236
|
+
HITL_NO_OUTCOMES: 'lint',
|
|
237
|
+
HITL_OUTCOMES_UNREACHABLE: 'lint',
|
|
238
|
+
HITL_OUTCOME_ACTION: 'lint',
|
|
239
|
+
HITL_OUTCOME_BAD_ID: 'lint',
|
|
240
|
+
HITL_OUTCOME_NO_NAME: 'lint',
|
|
241
|
+
HITL_OUTCOME_PORTS_OFF: 'lowering',
|
|
242
|
+
HITL_OUTCOME_PORTS_VARIANT: 'lowering',
|
|
243
|
+
HITL_OUTCOME_PORT_MISPLACED: 'lint',
|
|
244
|
+
HITL_OUTCOME_PORT_UNKNOWN: 'lowering',
|
|
245
|
+
HITL_OUTCOME_UNROUTED: 'lint',
|
|
246
|
+
HITL_PORT_ALREADY_WIRED: 'lowering',
|
|
247
|
+
HITL_READ_NOT_OUTPUT: 'lint',
|
|
248
|
+
HITL_READ_STATUS: 'lint',
|
|
249
|
+
HITL_READ_UNKNOWN_FIELD: 'lint',
|
|
250
|
+
HITL_RECIPIENT_TYPE: 'lint',
|
|
251
|
+
HITL_RECIPIENT_VALUE: 'lint',
|
|
252
|
+
HITL_UNREACHABLE_AFTER: 'lint',
|
|
253
|
+
HITL_VARIANT_UNKNOWN: 'lint',
|
|
254
|
+
HTTP_BINDING_REQUIRES_MANAGED: 'lowering',
|
|
255
|
+
HTTP_BRANCH_CONST: 'lint',
|
|
256
|
+
HTTP_BRANCH_DUP: 'lint',
|
|
257
|
+
HTTP_BRANCH_NAME: 'lint',
|
|
258
|
+
HTTP_BRANCH_UNKNOWN: 'lint',
|
|
259
|
+
HTTP_MANAGED_BINDING_INCOMPLETE: 'lowering',
|
|
260
|
+
HTTP_MANAGED_REQUIRED: 'lowering',
|
|
261
|
+
HTTP_ONERROR_V1: 'lint',
|
|
262
|
+
HTTP_READ_NOT_OUTPUT: 'lint',
|
|
263
|
+
HTTP_READ_UNKNOWN_FIELD: 'lint',
|
|
264
|
+
HTTP_READ_WITHOUT_RETURNS: 'lint',
|
|
265
|
+
HTTP_RETRY_COUNT_HIGH: 'lint',
|
|
266
|
+
HTTP_RETRY_COUNT_INVALID: 'lint',
|
|
267
|
+
HTTP_TARGET_CONNECTOR_EMPTY: 'lowering',
|
|
268
|
+
HTTP_TARGET_CONNECTOR_REQUIRES_BINDING: 'lowering',
|
|
269
|
+
HTTP_TIMEOUT_NOT_DURATION: 'lint',
|
|
270
|
+
HTTP_V1_RETIRED: 'lint',
|
|
271
|
+
INLINE_AGENT_COMPOSITE_INPUT: 'lint',
|
|
272
|
+
INLINE_AGENT_EMPTY_RETURNS: 'lint',
|
|
273
|
+
INLINE_AGENT_ESCALATION_APP_KEY_NOT_GUID: 'lint',
|
|
274
|
+
INLINE_AGENT_ESCALATION_APP_WITH_FIELDS: 'lint',
|
|
275
|
+
INLINE_AGENT_ESCALATION_FIELD_OPTIONS: 'lint',
|
|
276
|
+
INLINE_AGENT_ESCALATION_FIELD_OPTIONS_IGNORED: 'lint',
|
|
277
|
+
INLINE_AGENT_ESCALATION_FIELD_SETTING_INVALID: 'lint',
|
|
278
|
+
INLINE_AGENT_ESCALATION_FIELD_TYPE_UNKNOWN: 'lint',
|
|
279
|
+
INLINE_AGENT_ESCALATION_NO_APP: 'lint',
|
|
280
|
+
INLINE_AGENT_ESCALATION_NO_FIELDS: 'lint',
|
|
281
|
+
INLINE_AGENT_ESCALATION_NO_NAME: 'lint',
|
|
282
|
+
INLINE_AGENT_ESCALATION_QUICKFORM_WITH_APP: 'lint',
|
|
283
|
+
INLINE_AGENT_ESCALATION_VARIANT: 'lint',
|
|
284
|
+
INLINE_AGENT_INPUT_NAME_AMBIGUOUS: 'lint',
|
|
285
|
+
INLINE_AGENT_MEMORY_ID_NOT_GUID: 'lint',
|
|
286
|
+
INLINE_AGENT_MEMORY_INCOMPLETE: 'lint',
|
|
287
|
+
INLINE_AGENT_NO_MODEL: 'lint',
|
|
288
|
+
INLINE_AGENT_NO_SYSTEM_PROMPT: 'lint',
|
|
289
|
+
INLINE_AGENT_NO_USER_PROMPT: 'lint',
|
|
290
|
+
INLINE_AGENT_PROMPT_JSON_TEXT: 'lint',
|
|
291
|
+
INLINE_AGENT_READ_NOT_OUTPUT: 'lint',
|
|
292
|
+
INLINE_AGENT_READ_UNKNOWN_FIELD: 'lint',
|
|
293
|
+
INLINE_AGENT_RESOURCE_NODE_ID: 'lowering',
|
|
294
|
+
INLINE_AGENT_RESOURCE_SOURCE_DUP: 'lowering',
|
|
295
|
+
INLINE_AGENT_RESOURCE_SOURCE_NOT_GUID: 'lint',
|
|
296
|
+
INLINE_AGENT_SCAFFOLD_MODEL: 'lint',
|
|
297
|
+
INLINE_AGENT_SOURCE_NOT_GUID: 'lint',
|
|
298
|
+
INLINE_AGENT_TOOL_A2A_INCOMPLETE: 'lint',
|
|
299
|
+
INLINE_AGENT_TOOL_CLIENTSIDE_NO_NAME: 'lint',
|
|
300
|
+
INLINE_AGENT_TOOL_CONNECTOR_NO_CONNECTION: 'lint',
|
|
301
|
+
INLINE_AGENT_TOOL_HTTP_METHOD: 'lint',
|
|
302
|
+
INLINE_AGENT_TOOL_IXP_NO_NAME: 'lint',
|
|
303
|
+
INLINE_AGENT_TOOL_IXP_PROJECT_NOT_GUID: 'lint',
|
|
304
|
+
INLINE_AGENT_TOOL_KEY_NOT_GUID: 'lint',
|
|
305
|
+
INLINE_AGENT_TOOL_MCP_INCOMPLETE: 'lint',
|
|
306
|
+
INLINE_AGENT_TOOL_NO_OPERATION: 'lint',
|
|
307
|
+
INLINE_AGENT_TOOL_NO_RESOURCE_ID: 'lint',
|
|
308
|
+
INLINE_AGENT_TOOL_UNKNOWN_BUILTIN: 'lowering',
|
|
309
|
+
INLINE_AGENT_TOOL_UNKNOWN_KIND: 'lowering',
|
|
310
|
+
INLINE_AGENT_UNDECLARED_PLACEHOLDER: 'lint',
|
|
311
|
+
INLINE_AGENT_UNREFERENCED_INPUT: 'lint',
|
|
312
|
+
INPUT_READ_WITHOUT_TRIGGER: 'lint',
|
|
313
|
+
IXP_FORBIDDEN_INPUT: 'lint',
|
|
314
|
+
IXP_NO_FILE: 'lint',
|
|
315
|
+
IXP_NO_FOLDER: 'lint',
|
|
316
|
+
IXP_NO_MODEL_NAME: 'lint',
|
|
317
|
+
IXP_NO_NAME: 'lint',
|
|
318
|
+
IXP_NO_PROJECT: 'lowering',
|
|
319
|
+
IXP_PROJECT_NOT_NODE_TYPE: 'lowering',
|
|
320
|
+
IXP_PROJECT_TAIL_UNPARSEABLE: 'lowering',
|
|
321
|
+
JSON_REF_CIRCULAR: 'lowering',
|
|
322
|
+
JSON_REF_NOT_JSON: 'lowering',
|
|
323
|
+
JSON_REF_PATH_INVALID: 'lowering',
|
|
324
|
+
JSON_REF_TOO_DEEP: 'lowering',
|
|
325
|
+
JSON_REF_UNREADABLE: 'lowering',
|
|
326
|
+
JS_ESCAPE_COOKED: 'lint',
|
|
327
|
+
JS_ESCAPE_INVALID: 'lint',
|
|
328
|
+
LAYOUT_EDGE_AMBIGUOUS: 'lowering',
|
|
329
|
+
LAYOUT_EDGE_KEY_FORM: 'lowering',
|
|
330
|
+
LAYOUT_UNKNOWN_KEY: 'lowering',
|
|
331
|
+
LIBRARY_NOT_FOUND: 'lowering',
|
|
332
|
+
LIBRARY_REQUIRED: 'lowering',
|
|
333
|
+
LIST_OUTPUT_WRAPPER: 'lint',
|
|
334
|
+
LOOKUP_ARGS: 'lowering',
|
|
335
|
+
LOOKUP_LITERAL_ID: 'lint',
|
|
336
|
+
LOOKUP_MISPLACED: 'lowering',
|
|
337
|
+
LOOKUP_RUNTIME_VALUE: 'lint',
|
|
338
|
+
LOOKUP_UNKNOWN_ALIAS: 'lowering',
|
|
339
|
+
LOOKUP_UNKNOWN_FIELD: 'lowering',
|
|
340
|
+
LOOKUP_UNKNOWN_MATCH_KEY: 'lowering',
|
|
341
|
+
LOOKUP_UNRESOLVED: 'lowering',
|
|
342
|
+
LOOP_EXIT_IN_PARALLEL_ARM: 'lint',
|
|
343
|
+
LOOP_EXIT_UNREACHABLE_AFTER: 'lint',
|
|
344
|
+
LOOP_PARALLEL_LEGACY: 'lint',
|
|
345
|
+
LOOP_VERSION_UNSUPPORTED: 'lowering',
|
|
346
|
+
MOCK_HAS_NO_OUTPUT: 'lint',
|
|
347
|
+
NODE_FAMILY_REGISTRATION: 'lowering',
|
|
348
|
+
NODE_VERSION_UNREGISTERED: 'lowering',
|
|
349
|
+
NO_ID: 'lint',
|
|
350
|
+
NO_RETURN: 'lint',
|
|
351
|
+
OBJECT_UNPREPARED: 'lint',
|
|
352
|
+
ONERROR_NO_ERROR_PORT: 'lowering',
|
|
353
|
+
OUTPUT_BACKING_COLLISION: 'lowering',
|
|
354
|
+
OUTPUT_TYPE_MISMATCH: 'lint',
|
|
355
|
+
OUTPUT_VAR_MISMATCH: 'lowering',
|
|
356
|
+
PACKAGE_NODES_NOT_PLATFORM: 'lint',
|
|
357
|
+
PARALLEL_ARM_RETURNS: 'lint',
|
|
358
|
+
PARALLEL_EMPTY_ARM: 'lint',
|
|
359
|
+
PARALLEL_FORK_ALTERNATIVES: 'lowering',
|
|
360
|
+
PARALLEL_HAS_NO_OUTPUT: 'lint',
|
|
361
|
+
PARALLEL_REF_JOIN: 'lint',
|
|
362
|
+
PARALLEL_TOO_FEW_ARMS: 'lint',
|
|
363
|
+
PORT_ALREADY_ROUTED: 'lowering',
|
|
364
|
+
PORT_EMPTY_PATH: 'lowering',
|
|
365
|
+
PORT_NO_SOURCE_STEP: 'lowering',
|
|
366
|
+
QUEUE_BAD_DATE: 'lint',
|
|
367
|
+
QUEUE_BAD_PRIORITY: 'lint',
|
|
368
|
+
QUEUE_ITEM_EXPR_UNSUPPORTED: 'lowering',
|
|
369
|
+
QUEUE_ITEM_FIELD_NOT_PRIMITIVE: 'lint',
|
|
370
|
+
QUEUE_ITEM_NOT_OBJECT: 'lint',
|
|
371
|
+
QUEUE_KEY_NOT_GUID: 'lint',
|
|
372
|
+
QUEUE_NO_FOLDER: 'lint',
|
|
373
|
+
QUEUE_NO_ITEM: 'lint',
|
|
374
|
+
QUEUE_NO_KEY: 'lint',
|
|
375
|
+
QUEUE_NO_NAME: 'lint',
|
|
376
|
+
QUEUE_READ_NOT_OUTPUT: 'lint',
|
|
377
|
+
QUEUE_READ_UNKNOWN_FIELD: 'lint',
|
|
378
|
+
QUEUE_READ_WITHOUT_RETURNS: 'lint',
|
|
379
|
+
QUEUE_RETURNS_WITHOUT_WAIT: 'lint',
|
|
380
|
+
RAW_NODE_CONNECTOR: 'lowering',
|
|
381
|
+
RAW_NODE_TYPED_FAMILY: 'lint',
|
|
382
|
+
RAW_NODE_UNKNOWN_INPUT: 'lowering',
|
|
383
|
+
RAW_NODE_VERSION_MISMATCH: 'lowering',
|
|
384
|
+
READ_TEXT_UNAVAILABLE: 'lowering',
|
|
385
|
+
REF_INTO_LOOP: 'lint',
|
|
386
|
+
REF_INTO_PARALLEL_ARM: 'lint',
|
|
387
|
+
REF_INTO_PORT_LIST: 'lint',
|
|
388
|
+
REF_OUT_OF_LOOP: 'lint',
|
|
389
|
+
REF_OUT_OF_PARALLEL_ARM: 'lint',
|
|
390
|
+
REF_TARGET_NOT_NAME: 'lowering',
|
|
391
|
+
REF_TO_OWN_LOOP: 'lint',
|
|
392
|
+
REF_UNKNOWN_TARGET: 'lowering',
|
|
393
|
+
REF_UNREACHABLE_AFTER: 'lint',
|
|
394
|
+
RETURN_UPDATES_SAME_VAR: 'lowering',
|
|
395
|
+
RPA_KEY_NOT_KEY: 'lint',
|
|
396
|
+
RPA_LOCAL_HAS_FOLDER: 'lint',
|
|
397
|
+
RPA_LOCAL_NO_PROJECT_ID: 'lint',
|
|
398
|
+
RPA_LOCAL_PROJECT_ID_NOT_GUID: 'lint',
|
|
399
|
+
RPA_NAME_IS_PATH: 'lint',
|
|
400
|
+
RPA_NO_FOLDER: 'lint',
|
|
401
|
+
RPA_NO_KEY: 'lint',
|
|
402
|
+
RPA_NO_NAME: 'lint',
|
|
403
|
+
RPA_READ_NOT_OUTPUT: 'lint',
|
|
404
|
+
RPA_READ_UNKNOWN_FIELD: 'lint',
|
|
405
|
+
RPA_READ_WITHOUT_RETURNS: 'lint',
|
|
406
|
+
SCHEDULE_CRON_VERSION: 'lowering',
|
|
407
|
+
SCHEDULE_NEVER_FIRES: 'lint',
|
|
408
|
+
SCHEDULE_NOT_ISO: 'lint',
|
|
409
|
+
SCHEDULE_NO_INTERVAL: 'lint',
|
|
410
|
+
SCHEMA_VERSION_ABOVE_FLOOR: 'lint',
|
|
411
|
+
SCHEMA_VERSION_BELOW_FLOOR: 'lint',
|
|
412
|
+
SCHEMA_VERSION_ON_SUBFLOW: 'lint',
|
|
413
|
+
SCHEMA_VERSION_UNSUPPORTED: 'lowering',
|
|
414
|
+
SCRIPT_EMPTY_RETURNS: 'lint',
|
|
415
|
+
SCRIPT_FUNCTION_SCOPE: 'lowering',
|
|
416
|
+
SCRIPT_FUNCTION_UNLOWERABLE: 'lowering',
|
|
417
|
+
SCRIPT_RETURNS_UNKNOWN_TYPE: 'lint',
|
|
418
|
+
SDK_RESOLVE_HOOK_MISSING: 'lowering',
|
|
419
|
+
SEND_MESSAGE_NO_CONTENT: 'lint',
|
|
420
|
+
SEND_MESSAGE_NO_EXCHANGE: 'lint',
|
|
421
|
+
SHARED_INPUT_IN_SUBFLOW: 'lowering',
|
|
422
|
+
SHARED_INPUT_NAME_INVALID: 'lowering',
|
|
423
|
+
SHARED_INPUT_NOT_INPUT: 'lowering',
|
|
424
|
+
SHARED_INPUT_ROOT_MISSING: 'lint',
|
|
425
|
+
SHARED_INPUT_SAME_ROOT: 'lowering',
|
|
426
|
+
SHARED_INPUT_TARGET_IS_INPUT: 'lowering',
|
|
427
|
+
SHARED_INPUT_TYPE_MISMATCH: 'lowering',
|
|
428
|
+
SINGLE_CONVERSATION_TRIGGER: 'lint',
|
|
429
|
+
STEP_ID_COLLISION: 'lowering',
|
|
430
|
+
STEP_NOT_ACTION: 'lowering',
|
|
431
|
+
STEP_READ_WITHOUT_OUTPUT: 'lint',
|
|
432
|
+
STEP_SWITCH_ARM_LABEL: 'lowering',
|
|
433
|
+
STEP_SWITCH_EXIT_DUP: 'lint',
|
|
434
|
+
STEP_SWITCH_EXIT_UNKNOWN: 'lowering',
|
|
435
|
+
STEP_SWITCH_EXIT_UNROUTED: 'lint',
|
|
436
|
+
STEP_SWITCH_NO_ARMS: 'lowering',
|
|
437
|
+
STEP_SWITCH_NO_EXITS: 'lowering',
|
|
438
|
+
STICKY_NOTE_DUP_ID: 'lowering',
|
|
439
|
+
STICKY_NOTE_ID_TAKEN: 'lowering',
|
|
440
|
+
STICKY_NOTE_NO_CONTENT: 'lowering',
|
|
441
|
+
STICKY_NOTE_POSITION: 'lowering',
|
|
442
|
+
STICKY_NOTE_SIZE: 'lowering',
|
|
443
|
+
SUBFLOW_CHILD_TRIGGER: 'lint',
|
|
444
|
+
SUBFLOW_CYCLE: 'lint',
|
|
445
|
+
SUBFLOW_HAS_NO_OUTPUT: 'lint',
|
|
446
|
+
SUBFLOW_MISSING_INPUT: 'lint',
|
|
447
|
+
SUBFLOW_NO_CHILD: 'lint',
|
|
448
|
+
SUBFLOW_OUTPUT_NEVER_RETURNED: 'lint',
|
|
449
|
+
SUBFLOW_OUTPUT_NO_FIELD: 'lint',
|
|
450
|
+
SUBFLOW_UNKNOWN_INPUT: 'lint',
|
|
451
|
+
SUBFLOW_UNKNOWN_OUTPUT: 'lint',
|
|
452
|
+
SWITCH_CASE_FORM: 'lint',
|
|
453
|
+
SWITCH_CASE_ID: 'lint',
|
|
454
|
+
SWITCH_CASE_TYPE_MISMATCH: 'lint',
|
|
455
|
+
SWITCH_CONST_ON: 'lint',
|
|
456
|
+
SWITCH_CONST_WHEN: 'lint',
|
|
457
|
+
SWITCH_HAS_NO_OUTPUT: 'lint',
|
|
458
|
+
SWITCH_NO_CASES: 'lint',
|
|
459
|
+
SWITCH_ON_UNUSED: 'lint',
|
|
460
|
+
TEMPLATED_EXITS_ONLY: 'lowering',
|
|
461
|
+
TERMINATE_HAS_NO_OUTPUT: 'lint',
|
|
462
|
+
TERMINATE_NOT_ARM_HEAD: 'lint',
|
|
463
|
+
TERMINATE_UNREACHABLE_AFTER: 'lint',
|
|
464
|
+
TRANSFORM_AGG_NO_ALIAS: 'lint',
|
|
465
|
+
TRANSFORM_AGG_NO_FIELD: 'lint',
|
|
466
|
+
TRANSFORM_BAD_VOCAB: 'lint',
|
|
467
|
+
TRANSFORM_COLLECTION_LITERAL: 'lint',
|
|
468
|
+
TRANSFORM_COLLECTION_NOT_PATH: 'lint',
|
|
469
|
+
TRANSFORM_COLLECTION_NOT_REF: 'lint',
|
|
470
|
+
TRANSFORM_COLLECTION_SCALAR: 'lint',
|
|
471
|
+
TRANSFORM_CONTAINS_ARRAY_VALUE: 'lint',
|
|
472
|
+
TRANSFORM_EMPTY_FILTER: 'lint',
|
|
473
|
+
TRANSFORM_EMPTY_MAP: 'lint',
|
|
474
|
+
TRANSFORM_FILTER_NO_FIELD: 'lint',
|
|
475
|
+
TRANSFORM_FILTER_VALUE_EXPR: 'lint',
|
|
476
|
+
TRANSFORM_MAP_NO_FIELD: 'lint',
|
|
477
|
+
TRANSFORM_NO_COLLECTION: 'lint',
|
|
478
|
+
TRANSFORM_NO_GROUP_FIELD: 'lint',
|
|
479
|
+
TRANSFORM_NO_OPERATIONS: 'lint',
|
|
480
|
+
TRANSFORM_UNKNOWN_OP: 'lint',
|
|
481
|
+
TRANSFORM_VARIANT_ONE_OP: 'lint',
|
|
482
|
+
TRANSFORM_VARIANT_OP_MISMATCH: 'lint',
|
|
483
|
+
TRANSFORM_VARIANT_UNKNOWN: 'lowering',
|
|
484
|
+
TRIGGER_INPUTS_IGNORED: 'lint',
|
|
485
|
+
TRIGGER_UNKNOWN_KIND: 'lowering',
|
|
486
|
+
TYPESCRIPT_UNAVAILABLE: 'lowering',
|
|
487
|
+
UNKNOWN_LOOP_FIELD: 'lint',
|
|
488
|
+
UNKNOWN_REF: 'lint',
|
|
489
|
+
UPDATES_NOT_SUPPORTED: 'lowering',
|
|
490
|
+
UPDATE_INPUT_READONLY: 'lint',
|
|
491
|
+
UPDATE_UNKNOWN_VAR: 'lint',
|
|
492
|
+
VARIABLE_NAME_COLLISION: 'lowering',
|
|
493
|
+
VARS_BRACKET_READ: 'lint',
|
|
494
|
+
VOICE_AGENT_ITERATIONS: 'lint',
|
|
495
|
+
VOICE_AGENT_NO_PROMPT: 'lint',
|
|
496
|
+
VOICE_CALL_CONTEXT_NOT_OBJECT: 'lint',
|
|
497
|
+
VOICE_MODEL_UNKNOWN: 'lint',
|
|
498
|
+
VOICE_NO_CALL_CONTEXT: 'lint',
|
|
499
|
+
VOICE_PERSONA_UNKNOWN: 'lint',
|
|
500
|
+
};
|
|
501
|
+
/** The class of `code`, or `undefined` for a code the table does not list. */
|
|
502
|
+
export function refusalClass(code) {
|
|
503
|
+
return ownEntry(REFUSALS, code);
|
|
504
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { typescript } from './typescript-module.js';
|
|
2
|
+
import { CompileRefusal } from './compile-refusal.js';
|
|
2
3
|
/**
|
|
3
4
|
* The body a script node carries for `fn`, or a thrown error naming every
|
|
4
5
|
* reason it cannot be one.
|
|
@@ -15,7 +16,7 @@ export function lowerScriptFunction(fn, runtime, label) {
|
|
|
15
16
|
return result.code;
|
|
16
17
|
}
|
|
17
18
|
const name = label ?? `script(${functionName(fn) ?? 'function'})`;
|
|
18
|
-
throw new
|
|
19
|
+
throw new CompileRefusal('SCRIPT_FUNCTION_UNLOWERABLE', `${name} cannot be a script: ${result.problems.join(' ')}`);
|
|
19
20
|
}
|
|
20
21
|
const lowered = [];
|
|
21
22
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompileRefusal } from './compile-refusal.js';
|
|
1
2
|
const HOST_TYPESCRIPT = Symbol.for('uipath.maestro-builder-sdk.typescript');
|
|
2
3
|
let typescriptModule;
|
|
3
4
|
export function typescript() {
|
|
@@ -6,7 +7,7 @@ export function typescript() {
|
|
|
6
7
|
function fromNode() {
|
|
7
8
|
const getBuiltinModule = globalThis.process?.getBuiltinModule;
|
|
8
9
|
if (getBuiltinModule === undefined) {
|
|
9
|
-
throw new
|
|
10
|
+
throw new CompileRefusal('TYPESCRIPT_UNAVAILABLE', "no TypeScript compiler: outside Node, set globalThis[Symbol.for('uipath.maestro-builder-sdk.typescript')] to the 'typescript' module before checking a flow");
|
|
10
11
|
}
|
|
11
12
|
const { createRequire } = getBuiltinModule('node:module');
|
|
12
13
|
return createRequire(import.meta.url)('typescript');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ExprDiagnostic } from './core/expr-check.js';
|
|
2
2
|
import type { BuiltFlow } from './flow-sdk.js';
|
|
3
|
+
import { CompileRefusal } from './core/compile-refusal.js';
|
|
3
4
|
/** A diagnostic plus the node / field it was found in. */
|
|
4
5
|
export interface LocatedDiagnostic extends ExprDiagnostic {
|
|
5
6
|
where: string;
|
|
@@ -28,7 +29,7 @@ export declare function checkCookedEscapes(built: BuiltFlow): (LocatedDiagnostic
|
|
|
28
29
|
* `message` lists every problem (so a runner that prints `err.message` shows them
|
|
29
30
|
* all at once); `diagnostics` carries them structured for a caller that wants them.
|
|
30
31
|
*/
|
|
31
|
-
export declare class FlowBuildError extends
|
|
32
|
+
export declare class FlowBuildError extends CompileRefusal {
|
|
32
33
|
readonly diagnostics: LocatedDiagnostic[];
|
|
33
34
|
constructor(built: BuiltFlow, diagnostics: LocatedDiagnostic[]);
|
|
34
35
|
}
|
package/dist/flow-expr-check.js
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
import { Expr, cookedEscapesOf } from './core/expr.js';
|
|
31
31
|
import { checkExpression, cookedEscapeDiagnostics } from './core/expr-check.js';
|
|
32
32
|
import { stepDeclaredVariables } from './flow-step-variables.js';
|
|
33
|
+
import { CompileRefusal } from './core/compile-refusal.js';
|
|
33
34
|
const NOUN = 'input, variable, or step';
|
|
34
35
|
/**
|
|
35
36
|
* Every `$vars` root a reference may legitimately resolve to, across the WHOLE
|
|
@@ -269,12 +270,13 @@ export function checkCookedEscapes(built) {
|
|
|
269
270
|
* `message` lists every problem (so a runner that prints `err.message` shows them
|
|
270
271
|
* all at once); `diagnostics` carries them structured for a caller that wants them.
|
|
271
272
|
*/
|
|
272
|
-
export class FlowBuildError extends
|
|
273
|
+
export class FlowBuildError extends CompileRefusal {
|
|
273
274
|
diagnostics;
|
|
274
275
|
constructor(built, diagnostics) {
|
|
275
276
|
const label = built.name || built.id || 'flow';
|
|
276
277
|
const lines = diagnostics.map((d) => ` ✗ [${d.code}] in ${d.where}: ${d.message}${d.suggestion ? ` (did you mean "${d.suggestion}"?)` : ''}`);
|
|
277
|
-
|
|
278
|
+
// The first problem's code; `diagnostics` carries every one.
|
|
279
|
+
super(diagnostics[0]?.code ?? 'EXPR_SYNTAX', `Cannot build flow "${label}" — ${diagnostics.length} expression problem(s):\n${lines.join('\n')}`);
|
|
278
280
|
this.name = 'FlowBuildError';
|
|
279
281
|
this.diagnostics = diagnostics;
|
|
280
282
|
}
|