@uipath/maestro-builder-sdk 6.63.0 → 6.65.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/api-index.md +22 -21
- package/dist/api-members.md +82 -81
- package/dist/case/case-expr-check.d.ts +2 -1
- package/dist/case/case-expr-check.js +4 -2
- package/dist/case/case-sdk.js +11 -10
- package/dist/case/load.js +4 -3
- package/dist/case/serialize.js +52 -50
- package/dist/cli/commands/flow.js +4 -2
- package/dist/compile-cli.js +55 -45
- package/dist/core/event-filters.d.ts +20 -0
- package/dist/core/event-filters.js +27 -0
- package/dist/core/refusals.d.ts +88 -1
- package/dist/core/refusals.js +94 -7
- package/dist/decompile-cli.js +2 -2
- package/dist/decompile.js +36 -11
- package/dist/flow-node-type.d.ts +9 -0
- package/dist/flow-sdk.d.ts +24 -3
- package/dist/flow-sdk.js +1 -1
- package/dist/nodes/agent/flow/check.js +4 -4
- package/dist/nodes/connector/flow/node-type.js +36 -1
- package/dist/serialize.d.ts +24 -0
- package/dist/serialize.js +114 -4
- package/package.json +2 -2
package/dist/core/refusals.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
/** What a code means for `check` and `compile`. */
|
|
2
2
|
export type RefusalClass = 'lint' | 'lowering' | 'draft';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Every code the Flow and Case compile paths emit → its class. Sorted by code.
|
|
5
|
+
*
|
|
6
|
+
* One table, because codes are one namespace: `check` codes such as
|
|
7
|
+
* `CONNECTOR_INPUT` and `LIBRARY_REQUIRED` are shared across families, and a
|
|
8
|
+
* code means the same condition in each.
|
|
9
|
+
*/
|
|
4
10
|
export declare const REFUSALS: {
|
|
11
|
+
readonly ACTION_FIELD_UNKNOWN_KEY: "lint";
|
|
5
12
|
readonly AGENTIC_EMPTY_RETURNS: "lint";
|
|
6
13
|
readonly AGENTIC_KEY_NOT_KEY: "lint";
|
|
7
14
|
readonly AGENTIC_LOCAL_FORM_UNVERIFIED: "lint";
|
|
@@ -43,17 +50,36 @@ export declare const REFUSALS: {
|
|
|
43
50
|
readonly APIWF_READ_NOT_OUTPUT: "lint";
|
|
44
51
|
readonly APIWF_READ_UNKNOWN_FIELD: "lint";
|
|
45
52
|
readonly APIWF_READ_WITHOUT_RETURNS: "lint";
|
|
53
|
+
readonly API_EVENT_NO_BUSINESS_EVENT: "lowering";
|
|
46
54
|
readonly ARM_SCOPED_OUTPUT_READ: "lint";
|
|
55
|
+
readonly BINDING_CONNECTION_TWO_FOLDERS: "lowering";
|
|
47
56
|
readonly BINDING_MISSING: "draft";
|
|
48
57
|
readonly BINDING_PLACEHOLDER_UNRESOLVED: "draft";
|
|
49
58
|
readonly BINDING_SELF_NAME: "draft";
|
|
50
59
|
readonly BINDING_UNDECLARED: "draft";
|
|
51
60
|
readonly BRANCH_CONST_COND: "lint";
|
|
52
61
|
readonly BREAK_OUTSIDE_LOOP: "lowering";
|
|
62
|
+
readonly BUSINESS_EVENT_NAME: "lowering";
|
|
63
|
+
readonly BUSINESS_EVENT_PAYLOAD_TYPE: "lowering";
|
|
64
|
+
readonly BUSINESS_EVENT_UNKNOWN_OPTION: "lowering";
|
|
65
|
+
readonly BUSINESS_RULE_EMPTY_DATA: "lint";
|
|
66
|
+
readonly BUSINESS_RULE_OUTPUT_NAME: "lint";
|
|
67
|
+
readonly BUSINESS_RULE_OUTPUT_SOURCE: "lint";
|
|
53
68
|
readonly CALL_NO_NUMBER: "lint";
|
|
54
69
|
readonly CALL_NUMBER_NOT_E164: "lint";
|
|
55
70
|
readonly CARRIED_DEFINITION_CONFLICT: "lowering";
|
|
56
71
|
readonly CARRIED_DEFINITION_INVALID: "lowering";
|
|
72
|
+
readonly CASE_APP_DETAILS_LIMIT: "lint";
|
|
73
|
+
readonly CASE_APP_DETAILS_TYPE: "lint";
|
|
74
|
+
readonly CASE_EXPORT_NOT_BUILT: "lowering";
|
|
75
|
+
readonly CASE_IN_ARG_TRIGGER_NOT_ADDED: "lowering";
|
|
76
|
+
readonly CASE_LAYOUT_NODE_MATCH: "lowering";
|
|
77
|
+
readonly CASE_LAYOUT_UNKNOWN_FIELD: "lowering";
|
|
78
|
+
readonly CASE_NO_DEFAULT_EXPORT: "lowering";
|
|
79
|
+
readonly CASE_SOURCE_NOT_FOUND: "lowering";
|
|
80
|
+
readonly CASE_TRIGGER_OBJECT_AND_SUBSCRIPTION: "lowering";
|
|
81
|
+
readonly CASE_TRIGGER_OBJECT_INVALID: "lowering";
|
|
82
|
+
readonly CASE_VAR_DEFAULT_NOT_JSON: "lowering";
|
|
57
83
|
readonly CEQL_UNPARSEABLE: "lowering";
|
|
58
84
|
readonly CHECK_INCOMPLETE: "lowering";
|
|
59
85
|
readonly COMPILE_FAILED: "lowering";
|
|
@@ -68,6 +94,7 @@ export declare const REFUSALS: {
|
|
|
68
94
|
readonly CONNECTOR_NO_FLOW_DEFINITION: "lowering";
|
|
69
95
|
readonly CONNECTOR_OBJECT_NOT_GENERIC: "lowering";
|
|
70
96
|
readonly CONNECTOR_OBJECT_REQUIRED: "draft";
|
|
97
|
+
readonly CONNECTOR_OUTPUT_SOURCE: "lint";
|
|
71
98
|
readonly CONNECTOR_RESOLVE_FAILED: "lowering";
|
|
72
99
|
readonly CONTINUE_OUTSIDE_LOOP: "lowering";
|
|
73
100
|
readonly CONTRIBUTION_BINDING_UNRESOLVED: "draft";
|
|
@@ -112,11 +139,17 @@ export declare const REFUSALS: {
|
|
|
112
139
|
readonly DOC_NO_FILEREF: "lint";
|
|
113
140
|
readonly DOWHILE_CONST_COND: "lint";
|
|
114
141
|
readonly DOWHILE_LIMIT: "lint";
|
|
142
|
+
readonly DUP_BUSINESS_EVENT: "lowering";
|
|
115
143
|
readonly DUP_CASE: "lint";
|
|
116
144
|
readonly DUP_END_NAME: "lowering";
|
|
145
|
+
readonly DUP_EXIT_RULE: "lint";
|
|
146
|
+
readonly DUP_RULE_NAME: "lint";
|
|
147
|
+
readonly DUP_STAGE: "lowering";
|
|
117
148
|
readonly DUP_STEP: "lowering";
|
|
149
|
+
readonly DUP_TASK: "lowering";
|
|
118
150
|
readonly EMPTY_ARM: "lint";
|
|
119
151
|
readonly EMPTY_LOOP: "lint";
|
|
152
|
+
readonly EMPTY_REQUIRED_FIELD: "lint";
|
|
120
153
|
readonly ENTRY_POINT_DUP_ID: "lowering";
|
|
121
154
|
readonly ENTRY_POINT_INPUT_COLLISION: "lint";
|
|
122
155
|
readonly ENTRY_POINT_NO_SHARED_BODY: "lowering";
|
|
@@ -124,6 +157,8 @@ export declare const REFUSALS: {
|
|
|
124
157
|
readonly ERROR_FIELD_UNDECLARED: "lint";
|
|
125
158
|
readonly ERROR_READ_OUTSIDE_HANDLER: "lowering";
|
|
126
159
|
readonly ERROR_READ_VIA_OUT: "lint";
|
|
160
|
+
readonly ESCALATION_NO_RECIPIENTS: "lint";
|
|
161
|
+
readonly ESCALATION_ZERO_ATRISK_PCT: "lint";
|
|
127
162
|
readonly EVENT_BYOA_UNVERIFIED: "lowering";
|
|
128
163
|
readonly EVENT_FILTERS_NOT_ARRAY: "lint";
|
|
129
164
|
readonly EVENT_FILTER_BACKSLASH: "lowering";
|
|
@@ -141,14 +176,23 @@ export declare const REFUSALS: {
|
|
|
141
176
|
readonly EVENT_SCOPE_NOT_TAKEN: "lint";
|
|
142
177
|
readonly EVENT_UNKNOWN: "lowering";
|
|
143
178
|
readonly EVENT_UNPREPARED: "lint";
|
|
179
|
+
readonly EXCEPTION_STAGE_REQUIRED: "lint";
|
|
144
180
|
readonly EXPR_SYNTAX: "lowering";
|
|
145
181
|
readonly EXPR_UNDECLARED_REF: "lowering";
|
|
182
|
+
readonly EXTERNAL_TASK_CONNECTION: "lowering";
|
|
183
|
+
readonly EXTERNAL_TASK_DESCRIPTOR: "lint";
|
|
184
|
+
readonly EXTERNAL_TASK_DESCRIPTOR_CONTRACT: "lowering";
|
|
185
|
+
readonly EXTERNAL_TASK_EMPTY_DATA: "lint";
|
|
186
|
+
readonly EXTERNAL_TASK_FOLDER: "lowering";
|
|
187
|
+
readonly EXTERNAL_TASK_HYBRID_UNSUPPORTED: "lowering";
|
|
188
|
+
readonly EXTERNAL_TASK_MODE: "lowering";
|
|
146
189
|
readonly EXTRACT_SCHEMA_SHAPE: "lint";
|
|
147
190
|
readonly FILE_NOT_FOUND: "lowering";
|
|
148
191
|
readonly FIRE_AND_FORGET_READ: "lint";
|
|
149
192
|
readonly FIRE_AND_FORGET_RETURNS: "lowering";
|
|
150
193
|
readonly FLOW_EXPORT_NOT_BUILT: "lowering";
|
|
151
194
|
readonly FLOW_NO_DEFAULT_EXPORT: "lowering";
|
|
195
|
+
readonly FLOW_PROCESS_EMPTY_DATA: "lint";
|
|
152
196
|
readonly FLOW_SOURCE_NOT_FOUND: "lowering";
|
|
153
197
|
readonly FORM_TRIGGER_NO_INPUTS: "lint";
|
|
154
198
|
readonly FUNCTION_EMPTY_RETURNS: "lint";
|
|
@@ -319,13 +363,19 @@ export declare const REFUSALS: {
|
|
|
319
363
|
readonly LOOP_PARALLEL_LEGACY: "lint";
|
|
320
364
|
readonly LOOP_VERSION_UNSUPPORTED: "lowering";
|
|
321
365
|
readonly MOCK_HAS_NO_OUTPUT: "lint";
|
|
366
|
+
readonly NAME_HYGIENE: "lint";
|
|
322
367
|
readonly NODE_FAMILY_REGISTRATION: "lowering";
|
|
323
368
|
readonly NODE_VERSION_UNREGISTERED: "lowering";
|
|
369
|
+
readonly NO_CASE_COMPLETION: "lint";
|
|
324
370
|
readonly NO_ID: "lint";
|
|
371
|
+
readonly NO_REQUIRED_TASK: "lint";
|
|
325
372
|
readonly NO_RETURN: "lint";
|
|
373
|
+
readonly NO_STAGES: "lint";
|
|
326
374
|
readonly OBJECT_UNPREPARED: "lint";
|
|
327
375
|
readonly ONERROR_NO_ERROR_PORT: "lowering";
|
|
328
376
|
readonly OUTPUT_BACKING_COLLISION: "lowering";
|
|
377
|
+
readonly OUTPUT_FORWARD_READ: "lint";
|
|
378
|
+
readonly OUTPUT_SELF_REFERENCE: "lint";
|
|
329
379
|
readonly OUTPUT_TYPE_MISMATCH: "lint";
|
|
330
380
|
readonly OUTPUT_VAR_MISMATCH: "lowering";
|
|
331
381
|
readonly PACKAGE_NODES_NOT_PLATFORM: "lint";
|
|
@@ -338,6 +388,10 @@ export declare const REFUSALS: {
|
|
|
338
388
|
readonly PORT_ALREADY_ROUTED: "lowering";
|
|
339
389
|
readonly PORT_EMPTY_PATH: "lowering";
|
|
340
390
|
readonly PORT_NO_SOURCE_STEP: "lowering";
|
|
391
|
+
readonly PRESERVATION_COLLISION: "lowering";
|
|
392
|
+
readonly PRESERVATION_FIELD_COLLISION: "lowering";
|
|
393
|
+
readonly PRESERVATION_LEGACY_DEFAULT_MISMATCH: "lowering";
|
|
394
|
+
readonly PRESERVATION_TARGET_MISSING: "lowering";
|
|
341
395
|
readonly QUEUE_BAD_DATE: "lint";
|
|
342
396
|
readonly QUEUE_BAD_PRIORITY: "lint";
|
|
343
397
|
readonly QUEUE_ITEM_EXPR_UNSUPPORTED: "lowering";
|
|
@@ -366,6 +420,8 @@ export declare const REFUSALS: {
|
|
|
366
420
|
readonly REF_TO_OWN_LOOP: "lint";
|
|
367
421
|
readonly REF_UNKNOWN_TARGET: "lowering";
|
|
368
422
|
readonly REF_UNREACHABLE_AFTER: "lint";
|
|
423
|
+
readonly RESOURCE_BINDING_UNDECLARED: "lowering";
|
|
424
|
+
readonly RESOURCE_REF_IS_BINDING: "lowering";
|
|
369
425
|
readonly RETURN_UPDATES_SAME_VAR: "lowering";
|
|
370
426
|
readonly RPA_KEY_NOT_KEY: "lint";
|
|
371
427
|
readonly RPA_LOCAL_HAS_FOLDER: "lint";
|
|
@@ -378,6 +434,9 @@ export declare const REFUSALS: {
|
|
|
378
434
|
readonly RPA_READ_NOT_OUTPUT: "lint";
|
|
379
435
|
readonly RPA_READ_UNKNOWN_FIELD: "lint";
|
|
380
436
|
readonly RPA_READ_WITHOUT_RETURNS: "lint";
|
|
437
|
+
readonly RULE_PLACEMENT: "lint";
|
|
438
|
+
readonly RULE_TASKS_REQUIRED: "lint";
|
|
439
|
+
readonly RULE_UNKNOWN_OPTION: "lowering";
|
|
381
440
|
readonly SCHEDULE_CRON_VERSION: "lowering";
|
|
382
441
|
readonly SCHEDULE_NEVER_FIRES: "lint";
|
|
383
442
|
readonly SCHEDULE_NOT_ISO: "lint";
|
|
@@ -391,6 +450,9 @@ export declare const REFUSALS: {
|
|
|
391
450
|
readonly SCRIPT_FUNCTION_UNLOWERABLE: "lowering";
|
|
392
451
|
readonly SCRIPT_RETURNS_UNKNOWN_TYPE: "lint";
|
|
393
452
|
readonly SDK_RESOLVE_HOOK_MISSING: "lowering";
|
|
453
|
+
readonly SELECT_NEXT_STAGE_EXIT_TYPE: "lowering";
|
|
454
|
+
readonly SELECT_NEXT_STAGE_MULTIPLE: "lowering";
|
|
455
|
+
readonly SELECT_NEXT_STAGE_OBJECT_NAME: "lowering";
|
|
394
456
|
readonly SEND_MESSAGE_NO_CONTENT: "lint";
|
|
395
457
|
readonly SEND_MESSAGE_NO_EXCHANGE: "lint";
|
|
396
458
|
readonly SHARED_INPUT_IN_SUBFLOW: "lowering";
|
|
@@ -401,6 +463,10 @@ export declare const REFUSALS: {
|
|
|
401
463
|
readonly SHARED_INPUT_TARGET_IS_INPUT: "lowering";
|
|
402
464
|
readonly SHARED_INPUT_TYPE_MISMATCH: "lowering";
|
|
403
465
|
readonly SINGLE_CONVERSATION_TRIGGER: "lint";
|
|
466
|
+
readonly SLA_COUNT_RANGE: "lint";
|
|
467
|
+
readonly SLA_NONPOSITIVE: "lint";
|
|
468
|
+
readonly SLA_NO_ESCALATIONS: "lint";
|
|
469
|
+
readonly STAGE_NO_COMPLETION: "lint";
|
|
404
470
|
readonly STEP_ID_COLLISION: "lowering";
|
|
405
471
|
readonly STEP_NOT_ACTION: "lowering";
|
|
406
472
|
readonly STEP_READ_WITHOUT_OUTPUT: "lint";
|
|
@@ -432,10 +498,22 @@ export declare const REFUSALS: {
|
|
|
432
498
|
readonly SWITCH_HAS_NO_OUTPUT: "lint";
|
|
433
499
|
readonly SWITCH_NO_CASES: "lint";
|
|
434
500
|
readonly SWITCH_ON_UNUSED: "lint";
|
|
501
|
+
readonly TASK_INPUTS_UNSUPPORTED: "lowering";
|
|
502
|
+
readonly TASK_IO_TYPE: "lint";
|
|
503
|
+
readonly TASK_IO_UNRESOLVED_REFERENCE: "lowering";
|
|
504
|
+
readonly TASK_KIND_TWICE: "lowering";
|
|
505
|
+
readonly TASK_NO_ENTRY: "lint";
|
|
506
|
+
readonly TASK_NO_KIND: "lowering";
|
|
507
|
+
readonly TASK_OUTPUTS_NO_RESPONSE: "lowering";
|
|
508
|
+
readonly TASK_OUTPUTS_PLACEHOLDER_EVENT: "lowering";
|
|
509
|
+
readonly TASK_OUTPUTS_UNSUPPORTED: "lowering";
|
|
510
|
+
readonly TASK_OUTPUT_SOURCE_AND_ASSIGN: "lowering";
|
|
511
|
+
readonly TASK_REENTRY_IGNORED: "lint";
|
|
435
512
|
readonly TEMPLATED_EXITS_ONLY: "lowering";
|
|
436
513
|
readonly TERMINATE_HAS_NO_OUTPUT: "lint";
|
|
437
514
|
readonly TERMINATE_NOT_ARM_HEAD: "lint";
|
|
438
515
|
readonly TERMINATE_UNREACHABLE_AFTER: "lint";
|
|
516
|
+
readonly TIMER_VALUE_REQUIRED: "lint";
|
|
439
517
|
readonly TRANSFORM_AGG_NO_ALIAS: "lint";
|
|
440
518
|
readonly TRANSFORM_AGG_NO_FIELD: "lint";
|
|
441
519
|
readonly TRANSFORM_BAD_VOCAB: "lint";
|
|
@@ -459,13 +537,22 @@ export declare const REFUSALS: {
|
|
|
459
537
|
readonly TRIGGER_INPUTS_IGNORED: "lint";
|
|
460
538
|
readonly TRIGGER_UNKNOWN_KIND: "lowering";
|
|
461
539
|
readonly TYPESCRIPT_UNAVAILABLE: "lowering";
|
|
540
|
+
readonly UNKNOWN_BUSINESS_EVENT: "lowering";
|
|
541
|
+
readonly UNKNOWN_ESCALATION_REF: "lowering";
|
|
542
|
+
readonly UNKNOWN_EXIT_STAGE: "lowering";
|
|
462
543
|
readonly UNKNOWN_LOOP_FIELD: "lint";
|
|
463
544
|
readonly UNKNOWN_REF: "lint";
|
|
545
|
+
readonly UNKNOWN_RULE: "lowering";
|
|
546
|
+
readonly UNKNOWN_SLA_REF: "lowering";
|
|
547
|
+
readonly UNKNOWN_STAGE_REF: "lowering";
|
|
548
|
+
readonly UNKNOWN_TASK_REF: "lowering";
|
|
464
549
|
readonly UPDATES_NOT_SUPPORTED: "lowering";
|
|
465
550
|
readonly UPDATE_INPUT_READONLY: "lint";
|
|
466
551
|
readonly UPDATE_UNKNOWN_VAR: "lint";
|
|
467
552
|
readonly VARIABLE_NAME_COLLISION: "lowering";
|
|
468
553
|
readonly VARS_BRACKET_READ: "lint";
|
|
554
|
+
readonly VERSION_DEPRECATED: "lint";
|
|
555
|
+
readonly VERSION_MISMATCH: "lint";
|
|
469
556
|
readonly VOICE_AGENT_ITERATIONS: "lint";
|
|
470
557
|
readonly VOICE_AGENT_NO_PROMPT: "lint";
|
|
471
558
|
readonly VOICE_CALL_CONTEXT_NOT_OBJECT: "lint";
|
package/dist/core/refusals.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Every diagnostic and refusal code the Flow compile
|
|
2
|
+
* Every diagnostic and refusal code the Flow and Case compile paths emit, with its class
|
|
3
3
|
* (docs/CHECK_COMPILE_CONTRACT_DESIGN.md §3.1, #1440):
|
|
4
4
|
*
|
|
5
|
-
* - `lint`: the flow is probably wrong. Only `check` reports it; it never
|
|
5
|
+
* - `lint`: the flow (or case) is probably wrong. Only `check` reports it; it never
|
|
6
6
|
* stops `compile` from writing. A serializer warning (`CONNECTION_STUB`) is
|
|
7
7
|
* `lint` too: it never blocks.
|
|
8
|
-
* - `lowering`: `compile` cannot write a correct `.flow
|
|
9
|
-
* `compile`; `check` reports it too, from the serializer it runs in
|
|
10
|
-
* mode (`SerializeOpts.collect`), so the rule lives in one place.
|
|
8
|
+
* - `lowering`: `compile` cannot write a correct `.flow` (or caseplan). It always stops
|
|
9
|
+
* `compile`; for a Flow, `check` reports it too, from the serializer it runs in
|
|
10
|
+
* collect mode (`SerializeOpts.collect`), so the rule lives in one place.
|
|
11
11
|
* - `draft`: an unfinished canvas node (no connection yet, a required input
|
|
12
12
|
* left empty, a generic operation with no object). These are the codes a
|
|
13
13
|
* draft-tolerant compile collects instead of throwing (`DraftCode` in
|
|
@@ -32,14 +32,21 @@
|
|
|
32
32
|
* duplicate name.
|
|
33
33
|
*
|
|
34
34
|
* FB017 (`tests/lint/rules/fb017-coded-refusals.ts`) keeps this table and the
|
|
35
|
-
* source in step: every code-shaped string literal in
|
|
35
|
+
* source in step: every code-shaped string literal in those compile paths is
|
|
36
36
|
* a key here, and every key is emitted somewhere. The `<PREFIX>_READ_*` codes
|
|
37
37
|
* of the `codePrefix` node types are composed at run time (`check.ts`
|
|
38
38
|
* `checkDeclaredOutputRead`), so they appear here but not as literals.
|
|
39
39
|
*/
|
|
40
40
|
import { ownEntry } from './own-entry.js';
|
|
41
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Every code the Flow and Case compile paths emit → its class. Sorted by code.
|
|
43
|
+
*
|
|
44
|
+
* One table, because codes are one namespace: `check` codes such as
|
|
45
|
+
* `CONNECTOR_INPUT` and `LIBRARY_REQUIRED` are shared across families, and a
|
|
46
|
+
* code means the same condition in each.
|
|
47
|
+
*/
|
|
42
48
|
export const REFUSALS = {
|
|
49
|
+
ACTION_FIELD_UNKNOWN_KEY: 'lint',
|
|
43
50
|
AGENTIC_EMPTY_RETURNS: 'lint',
|
|
44
51
|
AGENTIC_KEY_NOT_KEY: 'lint',
|
|
45
52
|
AGENTIC_LOCAL_FORM_UNVERIFIED: 'lint',
|
|
@@ -81,17 +88,36 @@ export const REFUSALS = {
|
|
|
81
88
|
APIWF_READ_NOT_OUTPUT: 'lint',
|
|
82
89
|
APIWF_READ_UNKNOWN_FIELD: 'lint',
|
|
83
90
|
APIWF_READ_WITHOUT_RETURNS: 'lint',
|
|
91
|
+
API_EVENT_NO_BUSINESS_EVENT: 'lowering',
|
|
84
92
|
ARM_SCOPED_OUTPUT_READ: 'lint',
|
|
93
|
+
BINDING_CONNECTION_TWO_FOLDERS: 'lowering',
|
|
85
94
|
BINDING_MISSING: 'draft',
|
|
86
95
|
BINDING_PLACEHOLDER_UNRESOLVED: 'draft',
|
|
87
96
|
BINDING_SELF_NAME: 'draft',
|
|
88
97
|
BINDING_UNDECLARED: 'draft',
|
|
89
98
|
BRANCH_CONST_COND: 'lint',
|
|
90
99
|
BREAK_OUTSIDE_LOOP: 'lowering',
|
|
100
|
+
BUSINESS_EVENT_NAME: 'lowering',
|
|
101
|
+
BUSINESS_EVENT_PAYLOAD_TYPE: 'lowering',
|
|
102
|
+
BUSINESS_EVENT_UNKNOWN_OPTION: 'lowering',
|
|
103
|
+
BUSINESS_RULE_EMPTY_DATA: 'lint',
|
|
104
|
+
BUSINESS_RULE_OUTPUT_NAME: 'lint',
|
|
105
|
+
BUSINESS_RULE_OUTPUT_SOURCE: 'lint',
|
|
91
106
|
CALL_NO_NUMBER: 'lint',
|
|
92
107
|
CALL_NUMBER_NOT_E164: 'lint',
|
|
93
108
|
CARRIED_DEFINITION_CONFLICT: 'lowering',
|
|
94
109
|
CARRIED_DEFINITION_INVALID: 'lowering',
|
|
110
|
+
CASE_APP_DETAILS_LIMIT: 'lint',
|
|
111
|
+
CASE_APP_DETAILS_TYPE: 'lint',
|
|
112
|
+
CASE_EXPORT_NOT_BUILT: 'lowering',
|
|
113
|
+
CASE_IN_ARG_TRIGGER_NOT_ADDED: 'lowering',
|
|
114
|
+
CASE_LAYOUT_NODE_MATCH: 'lowering',
|
|
115
|
+
CASE_LAYOUT_UNKNOWN_FIELD: 'lowering',
|
|
116
|
+
CASE_NO_DEFAULT_EXPORT: 'lowering',
|
|
117
|
+
CASE_SOURCE_NOT_FOUND: 'lowering',
|
|
118
|
+
CASE_TRIGGER_OBJECT_AND_SUBSCRIPTION: 'lowering',
|
|
119
|
+
CASE_TRIGGER_OBJECT_INVALID: 'lowering',
|
|
120
|
+
CASE_VAR_DEFAULT_NOT_JSON: 'lowering',
|
|
95
121
|
CEQL_UNPARSEABLE: 'lowering',
|
|
96
122
|
// Only `check --baseline` reports it: collection stopped at a scope-level
|
|
97
123
|
// refusal, and `compile` (and `merge --baseline-from`) stops at that refusal.
|
|
@@ -109,6 +135,7 @@ export const REFUSALS = {
|
|
|
109
135
|
CONNECTOR_NO_FLOW_DEFINITION: 'lowering',
|
|
110
136
|
CONNECTOR_OBJECT_NOT_GENERIC: 'lowering',
|
|
111
137
|
CONNECTOR_OBJECT_REQUIRED: 'draft',
|
|
138
|
+
CONNECTOR_OUTPUT_SOURCE: 'lint',
|
|
112
139
|
CONNECTOR_RESOLVE_FAILED: 'lowering',
|
|
113
140
|
CONTINUE_OUTSIDE_LOOP: 'lowering',
|
|
114
141
|
CONTRIBUTION_BINDING_UNRESOLVED: 'draft',
|
|
@@ -153,11 +180,17 @@ export const REFUSALS = {
|
|
|
153
180
|
DOC_NO_FILEREF: 'lint',
|
|
154
181
|
DOWHILE_CONST_COND: 'lint',
|
|
155
182
|
DOWHILE_LIMIT: 'lint',
|
|
183
|
+
DUP_BUSINESS_EVENT: 'lowering',
|
|
156
184
|
DUP_CASE: 'lint',
|
|
157
185
|
DUP_END_NAME: 'lowering',
|
|
186
|
+
DUP_EXIT_RULE: 'lint',
|
|
187
|
+
DUP_RULE_NAME: 'lint',
|
|
188
|
+
DUP_STAGE: 'lowering',
|
|
158
189
|
DUP_STEP: 'lowering',
|
|
190
|
+
DUP_TASK: 'lowering',
|
|
159
191
|
EMPTY_ARM: 'lint',
|
|
160
192
|
EMPTY_LOOP: 'lint',
|
|
193
|
+
EMPTY_REQUIRED_FIELD: 'lint',
|
|
161
194
|
ENTRY_POINT_DUP_ID: 'lowering',
|
|
162
195
|
ENTRY_POINT_INPUT_COLLISION: 'lint',
|
|
163
196
|
ENTRY_POINT_NO_SHARED_BODY: 'lowering',
|
|
@@ -165,6 +198,8 @@ export const REFUSALS = {
|
|
|
165
198
|
ERROR_FIELD_UNDECLARED: 'lint',
|
|
166
199
|
ERROR_READ_OUTSIDE_HANDLER: 'lowering',
|
|
167
200
|
ERROR_READ_VIA_OUT: 'lint',
|
|
201
|
+
ESCALATION_NO_RECIPIENTS: 'lint',
|
|
202
|
+
ESCALATION_ZERO_ATRISK_PCT: 'lint',
|
|
168
203
|
EVENT_BYOA_UNVERIFIED: 'lowering',
|
|
169
204
|
EVENT_FILTERS_NOT_ARRAY: 'lint',
|
|
170
205
|
EVENT_FILTER_BACKSLASH: 'lowering',
|
|
@@ -182,14 +217,23 @@ export const REFUSALS = {
|
|
|
182
217
|
EVENT_SCOPE_NOT_TAKEN: 'lint',
|
|
183
218
|
EVENT_UNKNOWN: 'lowering',
|
|
184
219
|
EVENT_UNPREPARED: 'lint',
|
|
220
|
+
EXCEPTION_STAGE_REQUIRED: 'lint',
|
|
185
221
|
EXPR_SYNTAX: 'lowering',
|
|
186
222
|
EXPR_UNDECLARED_REF: 'lowering',
|
|
223
|
+
EXTERNAL_TASK_CONNECTION: 'lowering',
|
|
224
|
+
EXTERNAL_TASK_DESCRIPTOR: 'lint',
|
|
225
|
+
EXTERNAL_TASK_DESCRIPTOR_CONTRACT: 'lowering',
|
|
226
|
+
EXTERNAL_TASK_EMPTY_DATA: 'lint',
|
|
227
|
+
EXTERNAL_TASK_FOLDER: 'lowering',
|
|
228
|
+
EXTERNAL_TASK_HYBRID_UNSUPPORTED: 'lowering',
|
|
229
|
+
EXTERNAL_TASK_MODE: 'lowering',
|
|
187
230
|
EXTRACT_SCHEMA_SHAPE: 'lint',
|
|
188
231
|
FILE_NOT_FOUND: 'lowering',
|
|
189
232
|
FIRE_AND_FORGET_READ: 'lint',
|
|
190
233
|
FIRE_AND_FORGET_RETURNS: 'lowering',
|
|
191
234
|
FLOW_EXPORT_NOT_BUILT: 'lowering',
|
|
192
235
|
FLOW_NO_DEFAULT_EXPORT: 'lowering',
|
|
236
|
+
FLOW_PROCESS_EMPTY_DATA: 'lint',
|
|
193
237
|
FLOW_SOURCE_NOT_FOUND: 'lowering',
|
|
194
238
|
FORM_TRIGGER_NO_INPUTS: 'lint',
|
|
195
239
|
FUNCTION_EMPTY_RETURNS: 'lint',
|
|
@@ -360,13 +404,19 @@ export const REFUSALS = {
|
|
|
360
404
|
LOOP_PARALLEL_LEGACY: 'lint',
|
|
361
405
|
LOOP_VERSION_UNSUPPORTED: 'lowering',
|
|
362
406
|
MOCK_HAS_NO_OUTPUT: 'lint',
|
|
407
|
+
NAME_HYGIENE: 'lint',
|
|
363
408
|
NODE_FAMILY_REGISTRATION: 'lowering',
|
|
364
409
|
NODE_VERSION_UNREGISTERED: 'lowering',
|
|
410
|
+
NO_CASE_COMPLETION: 'lint',
|
|
365
411
|
NO_ID: 'lint',
|
|
412
|
+
NO_REQUIRED_TASK: 'lint',
|
|
366
413
|
NO_RETURN: 'lint',
|
|
414
|
+
NO_STAGES: 'lint',
|
|
367
415
|
OBJECT_UNPREPARED: 'lint',
|
|
368
416
|
ONERROR_NO_ERROR_PORT: 'lowering',
|
|
369
417
|
OUTPUT_BACKING_COLLISION: 'lowering',
|
|
418
|
+
OUTPUT_FORWARD_READ: 'lint',
|
|
419
|
+
OUTPUT_SELF_REFERENCE: 'lint',
|
|
370
420
|
OUTPUT_TYPE_MISMATCH: 'lint',
|
|
371
421
|
OUTPUT_VAR_MISMATCH: 'lowering',
|
|
372
422
|
PACKAGE_NODES_NOT_PLATFORM: 'lint',
|
|
@@ -379,6 +429,10 @@ export const REFUSALS = {
|
|
|
379
429
|
PORT_ALREADY_ROUTED: 'lowering',
|
|
380
430
|
PORT_EMPTY_PATH: 'lowering',
|
|
381
431
|
PORT_NO_SOURCE_STEP: 'lowering',
|
|
432
|
+
PRESERVATION_COLLISION: 'lowering',
|
|
433
|
+
PRESERVATION_FIELD_COLLISION: 'lowering',
|
|
434
|
+
PRESERVATION_LEGACY_DEFAULT_MISMATCH: 'lowering',
|
|
435
|
+
PRESERVATION_TARGET_MISSING: 'lowering',
|
|
382
436
|
QUEUE_BAD_DATE: 'lint',
|
|
383
437
|
QUEUE_BAD_PRIORITY: 'lint',
|
|
384
438
|
QUEUE_ITEM_EXPR_UNSUPPORTED: 'lowering',
|
|
@@ -407,6 +461,8 @@ export const REFUSALS = {
|
|
|
407
461
|
REF_TO_OWN_LOOP: 'lint',
|
|
408
462
|
REF_UNKNOWN_TARGET: 'lowering',
|
|
409
463
|
REF_UNREACHABLE_AFTER: 'lint',
|
|
464
|
+
RESOURCE_BINDING_UNDECLARED: 'lowering',
|
|
465
|
+
RESOURCE_REF_IS_BINDING: 'lowering',
|
|
410
466
|
RETURN_UPDATES_SAME_VAR: 'lowering',
|
|
411
467
|
RPA_KEY_NOT_KEY: 'lint',
|
|
412
468
|
RPA_LOCAL_HAS_FOLDER: 'lint',
|
|
@@ -419,6 +475,9 @@ export const REFUSALS = {
|
|
|
419
475
|
RPA_READ_NOT_OUTPUT: 'lint',
|
|
420
476
|
RPA_READ_UNKNOWN_FIELD: 'lint',
|
|
421
477
|
RPA_READ_WITHOUT_RETURNS: 'lint',
|
|
478
|
+
RULE_PLACEMENT: 'lint',
|
|
479
|
+
RULE_TASKS_REQUIRED: 'lint',
|
|
480
|
+
RULE_UNKNOWN_OPTION: 'lowering',
|
|
422
481
|
SCHEDULE_CRON_VERSION: 'lowering',
|
|
423
482
|
SCHEDULE_NEVER_FIRES: 'lint',
|
|
424
483
|
SCHEDULE_NOT_ISO: 'lint',
|
|
@@ -432,6 +491,9 @@ export const REFUSALS = {
|
|
|
432
491
|
SCRIPT_FUNCTION_UNLOWERABLE: 'lowering',
|
|
433
492
|
SCRIPT_RETURNS_UNKNOWN_TYPE: 'lint',
|
|
434
493
|
SDK_RESOLVE_HOOK_MISSING: 'lowering',
|
|
494
|
+
SELECT_NEXT_STAGE_EXIT_TYPE: 'lowering',
|
|
495
|
+
SELECT_NEXT_STAGE_MULTIPLE: 'lowering',
|
|
496
|
+
SELECT_NEXT_STAGE_OBJECT_NAME: 'lowering',
|
|
435
497
|
SEND_MESSAGE_NO_CONTENT: 'lint',
|
|
436
498
|
SEND_MESSAGE_NO_EXCHANGE: 'lint',
|
|
437
499
|
SHARED_INPUT_IN_SUBFLOW: 'lowering',
|
|
@@ -442,6 +504,10 @@ export const REFUSALS = {
|
|
|
442
504
|
SHARED_INPUT_TARGET_IS_INPUT: 'lowering',
|
|
443
505
|
SHARED_INPUT_TYPE_MISMATCH: 'lowering',
|
|
444
506
|
SINGLE_CONVERSATION_TRIGGER: 'lint',
|
|
507
|
+
SLA_COUNT_RANGE: 'lint',
|
|
508
|
+
SLA_NONPOSITIVE: 'lint',
|
|
509
|
+
SLA_NO_ESCALATIONS: 'lint',
|
|
510
|
+
STAGE_NO_COMPLETION: 'lint',
|
|
445
511
|
STEP_ID_COLLISION: 'lowering',
|
|
446
512
|
STEP_NOT_ACTION: 'lowering',
|
|
447
513
|
STEP_READ_WITHOUT_OUTPUT: 'lint',
|
|
@@ -473,10 +539,22 @@ export const REFUSALS = {
|
|
|
473
539
|
SWITCH_HAS_NO_OUTPUT: 'lint',
|
|
474
540
|
SWITCH_NO_CASES: 'lint',
|
|
475
541
|
SWITCH_ON_UNUSED: 'lint',
|
|
542
|
+
TASK_INPUTS_UNSUPPORTED: 'lowering',
|
|
543
|
+
TASK_IO_TYPE: 'lint',
|
|
544
|
+
TASK_IO_UNRESOLVED_REFERENCE: 'lowering',
|
|
545
|
+
TASK_KIND_TWICE: 'lowering',
|
|
546
|
+
TASK_NO_ENTRY: 'lint',
|
|
547
|
+
TASK_NO_KIND: 'lowering',
|
|
548
|
+
TASK_OUTPUTS_NO_RESPONSE: 'lowering',
|
|
549
|
+
TASK_OUTPUTS_PLACEHOLDER_EVENT: 'lowering',
|
|
550
|
+
TASK_OUTPUTS_UNSUPPORTED: 'lowering',
|
|
551
|
+
TASK_OUTPUT_SOURCE_AND_ASSIGN: 'lowering',
|
|
552
|
+
TASK_REENTRY_IGNORED: 'lint',
|
|
476
553
|
TEMPLATED_EXITS_ONLY: 'lowering',
|
|
477
554
|
TERMINATE_HAS_NO_OUTPUT: 'lint',
|
|
478
555
|
TERMINATE_NOT_ARM_HEAD: 'lint',
|
|
479
556
|
TERMINATE_UNREACHABLE_AFTER: 'lint',
|
|
557
|
+
TIMER_VALUE_REQUIRED: 'lint',
|
|
480
558
|
TRANSFORM_AGG_NO_ALIAS: 'lint',
|
|
481
559
|
TRANSFORM_AGG_NO_FIELD: 'lint',
|
|
482
560
|
TRANSFORM_BAD_VOCAB: 'lint',
|
|
@@ -500,13 +578,22 @@ export const REFUSALS = {
|
|
|
500
578
|
TRIGGER_INPUTS_IGNORED: 'lint',
|
|
501
579
|
TRIGGER_UNKNOWN_KIND: 'lowering',
|
|
502
580
|
TYPESCRIPT_UNAVAILABLE: 'lowering',
|
|
581
|
+
UNKNOWN_BUSINESS_EVENT: 'lowering',
|
|
582
|
+
UNKNOWN_ESCALATION_REF: 'lowering',
|
|
583
|
+
UNKNOWN_EXIT_STAGE: 'lowering',
|
|
503
584
|
UNKNOWN_LOOP_FIELD: 'lint',
|
|
504
585
|
UNKNOWN_REF: 'lint',
|
|
586
|
+
UNKNOWN_RULE: 'lowering',
|
|
587
|
+
UNKNOWN_SLA_REF: 'lowering',
|
|
588
|
+
UNKNOWN_STAGE_REF: 'lowering',
|
|
589
|
+
UNKNOWN_TASK_REF: 'lowering',
|
|
505
590
|
UPDATES_NOT_SUPPORTED: 'lowering',
|
|
506
591
|
UPDATE_INPUT_READONLY: 'lint',
|
|
507
592
|
UPDATE_UNKNOWN_VAR: 'lint',
|
|
508
593
|
VARIABLE_NAME_COLLISION: 'lowering',
|
|
509
594
|
VARS_BRACKET_READ: 'lint',
|
|
595
|
+
VERSION_DEPRECATED: 'lint',
|
|
596
|
+
VERSION_MISMATCH: 'lint',
|
|
510
597
|
VOICE_AGENT_ITERATIONS: 'lint',
|
|
511
598
|
VOICE_AGENT_NO_PROMPT: 'lint',
|
|
512
599
|
VOICE_CALL_CONTEXT_NOT_OBJECT: 'lint',
|
package/dist/decompile-cli.js
CHANGED
|
@@ -159,7 +159,7 @@ if (!existsSync(BASELINE)) {
|
|
|
159
159
|
// ── Step 1: capture the baseline = compile of the PRISTINE decompiled code,
|
|
160
160
|
// BEFORE any edit. Run this once right after decompiling, then edit. ──
|
|
161
161
|
mkdirSync(dirname(BASELINE), { recursive: true });
|
|
162
|
-
run('compile', [TS, '-o', BASELINE
|
|
162
|
+
run('compile', [TS, '-o', BASELINE]);
|
|
163
163
|
console.log('\\n>>> Baseline captured. Now EDIT ' + ${JSON.stringify(basename(tsPath))} + ', then re-run this script to compile + merge.');
|
|
164
164
|
} else {
|
|
165
165
|
// ── Step 2: compile your edits, then merge them back into the original. ──
|
|
@@ -182,7 +182,7 @@ if (!existsSync(BASELINE)) {
|
|
|
182
182
|
process.exit(2);
|
|
183
183
|
}
|
|
184
184
|
mkdirSync(dirname(EDITED), { recursive: true });
|
|
185
|
-
run('compile', [TS, '-o', EDITED
|
|
185
|
+
run('compile', [TS, '-o', EDITED]);
|
|
186
186
|
|
|
187
187
|
// ── DIFF GATE (seam) ──────────────────────────────────────────────────────
|
|
188
188
|
// A future step can diff ORIGINAL vs the about-to-be-written MERGED here and
|
package/dist/decompile.js
CHANGED
|
@@ -298,6 +298,11 @@ function optsArgWith(node, ctx, extra) {
|
|
|
298
298
|
const entries = updates.map((u) => `${key(u.variableId)}: ${emitVal(u.expression, ctx.imp, ctx.inputNames)}`);
|
|
299
299
|
parts.push(`updates: { ${entries.join(', ')} }`);
|
|
300
300
|
}
|
|
301
|
+
// A draft the canvas saved: `compile` writes it back only when the step says
|
|
302
|
+
// so AND the source carries its definition (carriedPairs), so a draft an agent
|
|
303
|
+
// adds of the same operation is still refused (StepOptions.draft).
|
|
304
|
+
if (isCanvasDraft(node))
|
|
305
|
+
parts.push('draft: true');
|
|
301
306
|
return parts.length ? `, { ${parts.join(', ')} }` : '';
|
|
302
307
|
}
|
|
303
308
|
// ─── Node type constants (mirror of serialize.ts NODE_TYPE) ───────────────────
|
|
@@ -957,8 +962,9 @@ function emitStepSpec(node, imp, inputNames, o, graph) {
|
|
|
957
962
|
/**
|
|
958
963
|
* A connector-bound node the file carries UNBOUND: Studio Web saves a draft whose
|
|
959
964
|
* connection was never picked as `connectionId: null`. The source cannot invent
|
|
960
|
-
* labels for it, and `
|
|
961
|
-
* rule `flow validate` applies too: flow-builder-sdk#890)
|
|
965
|
+
* labels for it, and `check` refuses a node without both (BINDING_MISSING, the
|
|
966
|
+
* rule `flow validate` applies too: flow-builder-sdk#890), and so does `compile`
|
|
967
|
+
* unless it is a carried canvas draft (`{ draft: true }`). So the source says so
|
|
962
968
|
* at the node and the run warns once, instead of handing back a file whose first
|
|
963
969
|
* compile fails with no context. Returns the inline marker, or '' when bound.
|
|
964
970
|
*/
|
|
@@ -968,10 +974,12 @@ function unboundMarker(node, labels, key, action) {
|
|
|
968
974
|
return '';
|
|
969
975
|
const names = missing.join(' and ');
|
|
970
976
|
warnOnce(`node ${tsLiteral(node.id)} (${node.type}) has no ${missing.join(' or ')} in the .flow (an unbound draft). `
|
|
971
|
-
+ `The source leaves ${missing.length > 1 ? 'them' : 'it'} out
|
|
972
|
-
|
|
977
|
+
+ `The source leaves ${missing.length > 1 ? 'them' : 'it'} out${isCanvasDraft(node)
|
|
978
|
+
? ' and marks the step `{ draft: true }`: compile writes it as a draft, and check refuses it'
|
|
979
|
+
: ', and compile and check refuse it'} (BINDING_MISSING) until it names both labels: `
|
|
980
|
+
+ `run \`${prepareCommand(key, action ?? '<action>')}\`, then pass `
|
|
973
981
|
+ `\`connection\` and \`folder\`.`);
|
|
974
|
-
return ` /* TODO: bind ${commentText(names)};
|
|
982
|
+
return ` /* TODO: bind ${commentText(names)}; check refuses this node until it has both labels (BINDING_MISSING) */`;
|
|
975
983
|
}
|
|
976
984
|
function emitEventSubscription(node, imp, inputNames) {
|
|
977
985
|
const prefix = node.type.startsWith('uipath.connector.event.') ? 'uipath.connector.event.'
|
|
@@ -1071,11 +1079,27 @@ function unsupportedSpec(node, imp, o) {
|
|
|
1071
1079
|
return `${imp.use('mock')}() /* TODO: unsupported node type ${commentText(node.type)} */`;
|
|
1072
1080
|
}
|
|
1073
1081
|
/**
|
|
1074
|
-
*
|
|
1075
|
-
*
|
|
1076
|
-
* `
|
|
1077
|
-
|
|
1078
|
-
|
|
1082
|
+
* Whether `node` is a draft the canvas saved whose definition the file holds
|
|
1083
|
+
* (its node type's `isDraft`). Decompile carries that definition and marks the
|
|
1084
|
+
* step `{ draft: true }`. For instance a Slack send with `detail.connectionId: null`.
|
|
1085
|
+
*/
|
|
1086
|
+
function isCanvasDraft(node) {
|
|
1087
|
+
const key = `${node.type}@${node.typeVersion}`;
|
|
1088
|
+
return !!node.typeVersion && runDefs.has(key) && registeredImpl(node)?.isDraft?.(node, runDefs.get(key)) === true;
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* Every `<type>@<version>` in the file (root and subflows) whose definition the
|
|
1092
|
+
* source must carry, and that the file's `definitions[]` holds — mapped to the
|
|
1093
|
+
* const name decompile hoists the definition under. Two kinds of node need it:
|
|
1094
|
+
*
|
|
1095
|
+
* - a pin this SDK cannot resolve, for a type it ships at some version. For
|
|
1096
|
+
* instance a quick-form node at 1.6 maps
|
|
1097
|
+
* `uipath.human-in-the-loop.quick-form@1.6` → `quickFormV1_6Definition`.
|
|
1098
|
+
* - a DRAFT the canvas saved (its node type's `isDraft`): `compile`
|
|
1099
|
+
* writes a draft node only with the definition the source carries for it
|
|
1100
|
+
* (docs/CHECK_COMPILE_CONTRACT_DESIGN.md D2), so an untouched canvas draft
|
|
1101
|
+
* compiles back. The step is also marked `{ draft: true }`, so a draft an
|
|
1102
|
+
* agent writes, even of the same operation, is refused.
|
|
1079
1103
|
*/
|
|
1080
1104
|
function carriedPairs(flow) {
|
|
1081
1105
|
const out = new Map();
|
|
@@ -1086,7 +1110,8 @@ function carriedPairs(flow) {
|
|
|
1086
1110
|
if (!n.typeVersion || out.has(key) || !runDefs.has(key))
|
|
1087
1111
|
continue;
|
|
1088
1112
|
const shipped = shippedVersions(n.type);
|
|
1089
|
-
|
|
1113
|
+
const unresolvable = shipped.length > 0 && !shipped.includes(n.typeVersion);
|
|
1114
|
+
if (!unresolvable && !isCanvasDraft(n))
|
|
1090
1115
|
continue;
|
|
1091
1116
|
const base = `${camel(String(n.type).split('.').pop() ?? 'node')}V${String(n.typeVersion).replace(/[^A-Za-z0-9]+/g, '_')}Definition`;
|
|
1092
1117
|
let name = base;
|
package/dist/flow-node-type.d.ts
CHANGED
|
@@ -484,6 +484,15 @@ export interface FlowRawNodeAdvice {
|
|
|
484
484
|
}
|
|
485
485
|
/** One Flow node type at one version. */
|
|
486
486
|
export interface FlowNodeType<Spec> extends NodeType<Spec, FlowNodeContribution, FlowContexts> {
|
|
487
|
+
/**
|
|
488
|
+
* Whether a serialized node of this type is a DRAFT the canvas saved: one an
|
|
489
|
+
* ordinary compile refuses only for a draft code (a connector with no
|
|
490
|
+
* connection, an empty required input). Decompile then copies the node's
|
|
491
|
+
* definition from the file into `.definitions([...])`, and `compile` writes
|
|
492
|
+
* the draft back with it (`SerializeOpts.carriedDrafts`). `definition` is the
|
|
493
|
+
* file's own `definitions[]` entry for the node, if any. Absent: never a draft.
|
|
494
|
+
*/
|
|
495
|
+
isDraft?(node: unknown, definition: unknown): boolean;
|
|
487
496
|
/**
|
|
488
497
|
* The node-level `model` every node of this type carries, whichever path emits
|
|
489
498
|
* it — this type's `serialize`, or a `rawNode` of its definition. `'omit'`: none
|
package/dist/flow-sdk.d.ts
CHANGED
|
@@ -444,6 +444,27 @@ export interface NodeOptions {
|
|
|
444
444
|
*/
|
|
445
445
|
label?: string;
|
|
446
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* The options of `.step()`: the {@link NodeOptions}, plus `draft` for a node the
|
|
449
|
+
* canvas saved unfinished.
|
|
450
|
+
*/
|
|
451
|
+
export interface StepOptions extends NodeOptions {
|
|
452
|
+
/**
|
|
453
|
+
* This node is a DRAFT the canvas saved: a connector with no connection, or
|
|
454
|
+
* with an empty required input. Decompile sets it on such a node, and also
|
|
455
|
+
* carries the node's definition in `.definitions([...])`. `compile` then
|
|
456
|
+
* writes the node with that carried definition and the inputs it has, and
|
|
457
|
+
* prints a warning (`BINDING_MISSING`, `CONNECTOR_INPUT_MISSING`) instead of
|
|
458
|
+
* refusing. Without the flag, or without a carried definition for the node's
|
|
459
|
+
* exact type and version, the draft is refused as usual. `check` reports the
|
|
460
|
+
* draft either way.
|
|
461
|
+
*
|
|
462
|
+
* Do not set it on a node you write: finish the node instead. For instance
|
|
463
|
+
* decompile prints `.step('notify', connector(SLACK, SEND, { ... }), { draft: true })`
|
|
464
|
+
* for a Slack send saved with no connection.
|
|
465
|
+
*/
|
|
466
|
+
draft?: boolean;
|
|
467
|
+
}
|
|
447
468
|
/**
|
|
448
469
|
* The options of `.parallel()`: the join's {@link NodeOptions}, plus the fork
|
|
449
470
|
* node when the flow has one.
|
|
@@ -558,7 +579,7 @@ export type Step = {
|
|
|
558
579
|
kind: 'action';
|
|
559
580
|
name: string;
|
|
560
581
|
spec: FlowActionSpec;
|
|
561
|
-
options?:
|
|
582
|
+
options?: StepOptions;
|
|
562
583
|
} | {
|
|
563
584
|
kind: 'branch';
|
|
564
585
|
name: string;
|
|
@@ -920,10 +941,10 @@ declare class StepList {
|
|
|
920
941
|
* so it must be unique within the flow.
|
|
921
942
|
* @param spec - What the node does, from an action factory.
|
|
922
943
|
* @param options - Node options; `version` selects the exact definition
|
|
923
|
-
* version (see {@link
|
|
944
|
+
* version (see {@link StepOptions}).
|
|
924
945
|
* @returns This builder, so calls chain.
|
|
925
946
|
*/
|
|
926
|
-
step(name: string, spec: FlowActionSpec | FlowAction, options?:
|
|
947
|
+
step(name: string, spec: FlowActionSpec | FlowAction, options?: StepOptions): this;
|
|
927
948
|
/**
|
|
928
949
|
* Add an action node and route EVERY exit it declares, one arm per exit.
|
|
929
950
|
*
|
package/dist/flow-sdk.js
CHANGED
|
@@ -388,7 +388,7 @@ class StepList {
|
|
|
388
388
|
* so it must be unique within the flow.
|
|
389
389
|
* @param spec - What the node does, from an action factory.
|
|
390
390
|
* @param options - Node options; `version` selects the exact definition
|
|
391
|
-
* version (see {@link
|
|
391
|
+
* version (see {@link StepOptions}).
|
|
392
392
|
* @returns This builder, so calls chain.
|
|
393
393
|
*/
|
|
394
394
|
step(name, spec, options) {
|