@uipath/maestro-builder-sdk 6.18.10 → 6.19.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 +185 -184
- package/dist/api-members.md +504 -473
- package/dist/check.js +177 -650
- package/dist/core/actions.d.ts +119 -760
- package/dist/core/actions.js +0 -306
- package/dist/core/error-port.d.ts +6 -0
- package/dist/core/error-port.js +9 -0
- package/dist/core/node-classes.d.ts +4 -63
- package/dist/core/node-classes.js +0 -112
- package/dist/core/nodes/family.d.ts +36 -0
- package/dist/core/nodes/family.js +1 -0
- package/dist/core/nodes/node-type.d.ts +136 -0
- package/dist/core/nodes/node-type.js +1 -0
- package/dist/core/nodes/registry.d.ts +57 -0
- package/dist/core/nodes/registry.js +122 -0
- package/dist/core/nodes/versioned.d.ts +50 -0
- package/dist/core/nodes/versioned.js +46 -0
- package/dist/core/typed-raw-node.d.ts +13 -62
- package/dist/core/typed-raw-node.js +40 -154
- package/dist/decompile.js +92 -271
- package/dist/flow-definitions.d.ts +10 -0
- package/dist/flow-definitions.js +35 -0
- package/dist/flow-node-registry.d.ts +13 -0
- package/dist/flow-node-registry.js +19 -0
- package/dist/flow-node-type.d.ts +192 -0
- package/dist/flow-node-type.js +1 -0
- package/dist/flow-sdk.d.ts +7 -0
- package/dist/flow-sdk.js +8 -0
- package/dist/nodes/data-fabric/flow/check.d.ts +13 -0
- package/dist/nodes/data-fabric/flow/check.js +164 -0
- package/dist/nodes/data-fabric/flow/factories.d.ts +113 -0
- package/dist/nodes/data-fabric/flow/factories.js +134 -0
- package/dist/nodes/data-fabric/flow/family.d.ts +7 -0
- package/dist/nodes/data-fabric/flow/family.js +9 -0
- package/dist/nodes/data-fabric/flow/index.d.ts +8 -0
- package/dist/nodes/data-fabric/flow/index.js +8 -0
- package/dist/nodes/data-fabric/flow/raw.d.ts +32 -0
- package/dist/nodes/data-fabric/flow/raw.js +100 -0
- package/dist/nodes/data-fabric/flow/shared.d.ts +77 -0
- package/dist/nodes/data-fabric/flow/shared.js +174 -0
- package/dist/nodes/data-fabric/flow/spec.d.ts +238 -0
- package/dist/nodes/data-fabric/flow/spec.js +1 -0
- package/dist/nodes/data-fabric/flow/verbs.d.ts +29 -0
- package/dist/nodes/data-fabric/flow/verbs.js +239 -0
- package/dist/nodes/delay/flow/check.d.ts +16 -0
- package/dist/nodes/delay/flow/check.js +86 -0
- package/dist/nodes/delay/flow/factories.d.ts +28 -0
- package/dist/nodes/delay/flow/factories.js +38 -0
- package/dist/nodes/delay/flow/family.d.ts +3 -0
- package/dist/nodes/delay/flow/family.js +8 -0
- package/dist/nodes/delay/flow/index.d.ts +3 -0
- package/dist/nodes/delay/flow/index.js +3 -0
- package/dist/nodes/delay/flow/node-type.d.ts +13 -0
- package/dist/nodes/delay/flow/node-type.js +71 -0
- package/dist/nodes/delay/flow/spec.d.ts +43 -0
- package/dist/nodes/delay/flow/spec.js +16 -0
- package/dist/nodes/document/flow/factories.d.ts +27 -0
- package/dist/nodes/document/flow/factories.js +30 -0
- package/dist/nodes/document/flow/family.d.ts +3 -0
- package/dist/nodes/document/flow/family.js +7 -0
- package/dist/nodes/document/flow/index.d.ts +3 -0
- package/dist/nodes/document/flow/index.js +3 -0
- package/dist/nodes/document/flow/node-type.d.ts +14 -0
- package/dist/nodes/document/flow/node-type.js +150 -0
- package/dist/nodes/document/flow/spec.d.ts +65 -0
- package/dist/nodes/document/flow/spec.js +1 -0
- package/dist/nodes/mock/flow/factories.d.ts +51 -0
- package/dist/nodes/mock/flow/factories.js +47 -0
- package/dist/nodes/mock/flow/family.d.ts +3 -0
- package/dist/nodes/mock/flow/family.js +7 -0
- package/dist/nodes/mock/flow/index.d.ts +2 -0
- package/dist/nodes/mock/flow/index.js +2 -0
- package/dist/nodes/mock/flow/node-type.d.ts +11 -0
- package/dist/nodes/mock/flow/node-type.js +51 -0
- package/dist/nodes/script/flow/check.d.ts +19 -0
- package/dist/nodes/script/flow/check.js +49 -0
- package/dist/nodes/script/flow/factories.d.ts +14 -0
- package/dist/nodes/script/flow/factories.js +15 -0
- package/dist/nodes/script/flow/family.d.ts +3 -0
- package/dist/nodes/script/flow/family.js +8 -0
- package/dist/nodes/script/flow/index.d.ts +3 -0
- package/dist/nodes/script/flow/index.js +3 -0
- package/dist/nodes/script/flow/node-type.d.ts +7 -0
- package/dist/nodes/script/flow/node-type.js +125 -0
- package/dist/nodes/script/flow/spec.d.ts +52 -0
- package/dist/nodes/script/flow/spec.js +1 -0
- package/dist/nodes/transform/flow/check.d.ts +6 -0
- package/dist/nodes/transform/flow/check.js +229 -0
- package/dist/nodes/transform/flow/factories.d.ts +52 -0
- package/dist/nodes/transform/flow/factories.js +53 -0
- package/dist/nodes/transform/flow/family.d.ts +3 -0
- package/dist/nodes/transform/flow/family.js +8 -0
- package/dist/nodes/transform/flow/index.d.ts +3 -0
- package/dist/nodes/transform/flow/index.js +3 -0
- package/dist/nodes/transform/flow/node-type.d.ts +7 -0
- package/dist/nodes/transform/flow/node-type.js +244 -0
- package/dist/nodes/transform/flow/spec.d.ts +116 -0
- package/dist/nodes/transform/flow/spec.js +10 -0
- package/dist/raw-node-advice.d.ts +16 -0
- package/dist/raw-node-advice.js +36 -0
- package/dist/raw-node.d.ts +71 -0
- package/dist/raw-node.js +116 -0
- package/dist/serialize.js +138 -492
- package/package.json +2 -2
package/dist/raw-node.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `rawNode` — place a node this SDK has no factory for, carrying its definition
|
|
3
|
+
* verbatim. Moved from core/node-classes.ts in Phase 3 of
|
|
4
|
+
* docs/NODE_TYPE_ARCHITECTURE_DESIGN.md so its diagnostics can ask the node-type
|
|
5
|
+
* registry what a registered type says about a raw node of it; the package entry
|
|
6
|
+
* re-exports it, so authors import it exactly as before.
|
|
7
|
+
*/
|
|
8
|
+
import { FlowAction, } from './core/node-classes.js';
|
|
9
|
+
import { connectorRawNodeRefusal } from './core/connector-raw-node.js';
|
|
10
|
+
import { rawNodeInputProblem, rawNodeTypedFamilyWarning } from './raw-node-advice.js';
|
|
11
|
+
/**
|
|
12
|
+
* Place a node this SDK has no factory for, carrying its definition verbatim
|
|
13
|
+
* (`uipath.exotic.thing@2.1` and the manifest the platform served for it).
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* This is the escape hatch the coverage plan requires: an unknown registry
|
|
17
|
+
* definition is expressible without bypassing serializer invariants. The
|
|
18
|
+
* serializer still owns the node's id, label, `typeVersion` and edge wiring; you
|
|
19
|
+
* supply which definition and which inputs, exactly as a hand-written
|
|
20
|
+
* {@link FlowAction} subclass would.
|
|
21
|
+
*
|
|
22
|
+
* It is also what `decompile` emits for a node type it cannot name, so a
|
|
23
|
+
* round trip preserves the node's TYPE and VERSION instead of degrading it to a
|
|
24
|
+
* placeholder:
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* .step('exotic', rawNode({
|
|
28
|
+
* nodeType: 'uipath.exotic.thing',
|
|
29
|
+
* version: '2.1',
|
|
30
|
+
* manifest: exoticManifest, // exactly what `registry get` returned
|
|
31
|
+
* inputs: { where: input('scope') },
|
|
32
|
+
* }))
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* `manifest` must be a real definition — an exact copy of what the registry or
|
|
36
|
+
* Workbench serves for that `nodeType@version`. It is not permission to invent
|
|
37
|
+
* one: the platform resolves the node against its own catalog at run time, so a
|
|
38
|
+
* hand-written manifest validates locally and fails on the tenant.
|
|
39
|
+
*
|
|
40
|
+
* Prefer a typed factory when one exists — it carries the family's checks, its
|
|
41
|
+
* defaults, and its output contract, none of which a raw node can know.
|
|
42
|
+
*
|
|
43
|
+
* **Never for a connector.** A `uipath.connector.*` node type is refused by
|
|
44
|
+
* `check` and `compile`: a raw node carries the author's inputs verbatim, so the
|
|
45
|
+
* emitted node has no `inputs.detail` and no connection binding — `validate`
|
|
46
|
+
* only warns ("Connector is not configured") and the run can never reach
|
|
47
|
+
* Integration Service. Use {@link connector}, and `registry prepare` when
|
|
48
|
+
* compile reports an input the static library does not carry; use
|
|
49
|
+
* {@link onEvent} for a connector event trigger.
|
|
50
|
+
*
|
|
51
|
+
* **Prefer the typed factory** for a node type that has one: `check` warns
|
|
52
|
+
* (`RAW_NODE_TYPED_FAMILY`), because `validate` cannot see an input the
|
|
53
|
+
* registry definition does not declare. For a `core.datafabric.*` type, a key
|
|
54
|
+
* the product never reads (an invented `_sortOptions` in place of `_sort`) is
|
|
55
|
+
* an error at a version the SDK bundles (`RAW_NODE_UNKNOWN_INPUT`); the
|
|
56
|
+
* canvas's snapshots, such as the `_entityFields` a related-path filter
|
|
57
|
+
* needs, stay legal.
|
|
58
|
+
*
|
|
59
|
+
* @param spec - The definition to compile against, plus the node's inputs.
|
|
60
|
+
* @returns A node to pass to `.step(...)`.
|
|
61
|
+
*/
|
|
62
|
+
export function rawNode(spec) {
|
|
63
|
+
return new RawNode(spec);
|
|
64
|
+
}
|
|
65
|
+
/** The {@link rawNode} implementation — a snapshot-backed contribution. */
|
|
66
|
+
class RawNode extends FlowAction {
|
|
67
|
+
spec;
|
|
68
|
+
constructor(spec) {
|
|
69
|
+
super();
|
|
70
|
+
this.spec = spec;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* `check` surfaces the connector refusal as an error, a typed family as a
|
|
74
|
+
* warning, and an input a registered node type never reads as an error at a
|
|
75
|
+
* bundled version (a warning at any other); `compile` throws the errors
|
|
76
|
+
* (see {@link contribute}).
|
|
77
|
+
*/
|
|
78
|
+
diagnostics() {
|
|
79
|
+
const refusal = connectorRawNodeRefusal(this.spec.nodeType);
|
|
80
|
+
if (refusal)
|
|
81
|
+
return [{ code: 'RAW_NODE_CONNECTOR', severity: 'error', message: refusal }];
|
|
82
|
+
const out = [];
|
|
83
|
+
const unknown = rawNodeInputProblem(this.spec.nodeType, this.spec.version, this.spec.inputs);
|
|
84
|
+
if (unknown)
|
|
85
|
+
out.push({ code: 'RAW_NODE_UNKNOWN_INPUT', ...unknown });
|
|
86
|
+
const typed = rawNodeTypedFamilyWarning(this.spec.nodeType);
|
|
87
|
+
if (typed)
|
|
88
|
+
out.push({ code: 'RAW_NODE_TYPED_FAMILY', severity: 'warning', message: typed });
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
contribute(context) {
|
|
92
|
+
// compile does not run diagnostics(); refuse here too so the escape hatch
|
|
93
|
+
// cannot emit an unconfigured connector node. (An input a registered node
|
|
94
|
+
// type never reads is refused by the serializer, for every contribution.)
|
|
95
|
+
const refusal = connectorRawNodeRefusal(this.spec.nodeType);
|
|
96
|
+
if (refusal)
|
|
97
|
+
throw new Error(refusal);
|
|
98
|
+
const version = context.requestedVersion ?? this.spec.version;
|
|
99
|
+
if (context.requestedVersion !== undefined && context.requestedVersion !== this.spec.version) {
|
|
100
|
+
// Versions are exact everywhere in this SDK: a contributor may not
|
|
101
|
+
// substitute its own for an explicit request (design §2.6).
|
|
102
|
+
throw new Error(`rawNode("${this.spec.nodeType}") carries version ${this.spec.version}, but the step requests `
|
|
103
|
+
+ `${context.requestedVersion}. Pass the manifest for the requested version, or drop { version }.`);
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
definition: {
|
|
107
|
+
source: 'snapshot',
|
|
108
|
+
nodeType: this.spec.nodeType,
|
|
109
|
+
version,
|
|
110
|
+
manifest: this.spec.manifest,
|
|
111
|
+
},
|
|
112
|
+
...(this.spec.inputs !== undefined ? { inputs: this.spec.inputs } : {}),
|
|
113
|
+
...(this.spec.outputs !== undefined ? { outputs: this.spec.outputs } : {}),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|