@uipath/maestro-builder-sdk 6.18.10 → 6.20.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 +506 -473
- package/dist/check.js +358 -695
- package/dist/cli/commands/flow.js +3 -0
- package/dist/compile-cli.js +51 -0
- package/dist/core/actions.d.ts +132 -765
- package/dist/core/actions.js +1 -307
- package/dist/core/binding-identity.d.ts +22 -0
- package/dist/core/binding-identity.js +28 -0
- package/dist/core/context-index.d.ts +34 -0
- package/dist/core/context-index.js +38 -0
- package/dist/core/definitionless-node-types.d.ts +16 -0
- package/dist/core/definitionless-node-types.js +16 -0
- package/dist/core/error-port.d.ts +6 -0
- package/dist/core/error-port.js +9 -0
- package/dist/core/form-field-type.d.ts +33 -0
- package/dist/core/form-field-type.js +30 -0
- package/dist/core/hitl-routing.d.ts +8 -0
- package/dist/core/hitl-routing.js +17 -1
- 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/process-resource-sort-order.d.ts +40 -0
- package/dist/core/process-resource-sort-order.js +44 -0
- package/dist/core/typed-raw-node.d.ts +13 -62
- package/dist/core/typed-raw-node.js +40 -154
- package/dist/core/wire-expr.d.ts +27 -0
- package/dist/core/wire-expr.js +34 -0
- package/dist/decompile-cli.js +11 -1
- package/dist/decompile.d.ts +8 -3
- package/dist/decompile.js +665 -354
- package/dist/flow-definitions.d.ts +10 -0
- package/dist/flow-definitions.js +35 -0
- package/dist/flow-expr-check.js +1 -1
- 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 +40 -1
- package/dist/flow-sdk.js +29 -2
- package/dist/flow-step-tree.js +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/merge-cli.js +25 -8
- package/dist/merge-roundtrip.d.ts +81 -0
- package/dist/merge-roundtrip.js +404 -0
- package/dist/merge.d.ts +35 -6
- package/dist/merge.js +124 -24
- package/dist/node-placement.d.ts +93 -0
- package/dist/node-placement.js +163 -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 +245 -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/registry/uip/pipeline-front-door.js +5 -3
- package/dist/serialize.js +246 -549
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bundled definitions, keyed `<nodeType>@<version>`. Deep-frozen: every reader
|
|
3
|
+
* shares this one copy, so a write meant for one node must clone first, and one
|
|
4
|
+
* that does not throws at its own site instead of leaking into another reader.
|
|
5
|
+
*/
|
|
6
|
+
export declare const BUNDLED_DEFINITIONS: Readonly<Record<string, any>>;
|
|
7
|
+
/** Whether the SDK bundles `<typeName>@<version>`. */
|
|
8
|
+
export declare function hasBundledDefinition(typeName: string, version: string): boolean;
|
|
9
|
+
/** The versions of `typeName` the SDK bundles, in bundle order. */
|
|
10
|
+
export declare function bundledVersions(typeName: string): string[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The node definitions this SDK bundles for Flow (`core-definitions.json`, keyed
|
|
3
|
+
* `<nodeType>@<version>`): the one parse of the bundle, shared by `serialize`,
|
|
4
|
+
* `decompile` and the node-type registry's validation.
|
|
5
|
+
*
|
|
6
|
+
* Kept apart from `serialize.ts` so the registry can depend on the bundle without
|
|
7
|
+
* importing the serializer that depends on the registry.
|
|
8
|
+
*/
|
|
9
|
+
import { readFileSync } from 'node:fs';
|
|
10
|
+
import { dirname, join } from 'node:path';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
/**
|
|
13
|
+
* The bundled definitions, keyed `<nodeType>@<version>`. Deep-frozen: every reader
|
|
14
|
+
* shares this one copy, so a write meant for one node must clone first, and one
|
|
15
|
+
* that does not throws at its own site instead of leaking into another reader.
|
|
16
|
+
*/
|
|
17
|
+
export const BUNDLED_DEFINITIONS = deepFreeze(JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), 'core-definitions.json'), 'utf8')));
|
|
18
|
+
function deepFreeze(value) {
|
|
19
|
+
if (value !== null && typeof value === 'object' && !Object.isFrozen(value)) {
|
|
20
|
+
Object.freeze(value);
|
|
21
|
+
for (const child of Object.values(value))
|
|
22
|
+
deepFreeze(child);
|
|
23
|
+
}
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
const BUNDLED_KEYS = new Set(Object.keys(BUNDLED_DEFINITIONS));
|
|
27
|
+
/** Whether the SDK bundles `<typeName>@<version>`. */
|
|
28
|
+
export function hasBundledDefinition(typeName, version) {
|
|
29
|
+
return BUNDLED_KEYS.has(`${typeName}@${version}`);
|
|
30
|
+
}
|
|
31
|
+
/** The versions of `typeName` the SDK bundles, in bundle order. */
|
|
32
|
+
export function bundledVersions(typeName) {
|
|
33
|
+
const prefix = `${typeName}@`;
|
|
34
|
+
return [...BUNDLED_KEYS].filter((k) => k.startsWith(prefix)).map((k) => k.slice(prefix.length));
|
|
35
|
+
}
|
package/dist/flow-expr-check.js
CHANGED
|
@@ -75,7 +75,7 @@ function addStepNames(steps, roots) {
|
|
|
75
75
|
for (const s of steps) {
|
|
76
76
|
// `return` carries a synthetic name; the port-edge kinds carry none at all —
|
|
77
77
|
// they are edges, not nodes, so there is nothing to reference them by.
|
|
78
|
-
if (s.kind !== 'return' && s.kind !== 'stepToRef' && s.kind !== 'stepToList' && s.kind !== 'break')
|
|
78
|
+
if (s.kind !== 'return' && s.kind !== 'stepToRef' && s.kind !== 'stepToList' && s.kind !== 'break' && s.kind !== 'continue')
|
|
79
79
|
roots.add(s.name);
|
|
80
80
|
switch (s.kind) {
|
|
81
81
|
case 'stepToList':
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flow's node-type registry: every Flow node family, listed explicitly
|
|
3
|
+
* (docs/NODE_TYPE_ARCHITECTURE_DESIGN.md §4.5).
|
|
4
|
+
*
|
|
5
|
+
* While a kind is not listed here, `serialize`, `check` and `decompile` handle it
|
|
6
|
+
* with their existing branches — the FB014 pins in `tests/lint/pins.txt` are what
|
|
7
|
+
* is left to port.
|
|
8
|
+
*/
|
|
9
|
+
import { NodeTypeRegistry } from './core/nodes/registry.js';
|
|
10
|
+
import type { FlowContexts, FlowNodeFamily } from './flow-node-type.js';
|
|
11
|
+
/** The families, in no significant order. Adding one is the whole of registering it. */
|
|
12
|
+
export declare const FLOW_NODE_FAMILIES: readonly FlowNodeFamily[];
|
|
13
|
+
export declare const FLOW_NODE_TYPES: NodeTypeRegistry<FlowContexts>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flow's node-type registry: every Flow node family, listed explicitly
|
|
3
|
+
* (docs/NODE_TYPE_ARCHITECTURE_DESIGN.md §4.5).
|
|
4
|
+
*
|
|
5
|
+
* While a kind is not listed here, `serialize`, `check` and `decompile` handle it
|
|
6
|
+
* with their existing branches — the FB014 pins in `tests/lint/pins.txt` are what
|
|
7
|
+
* is left to port.
|
|
8
|
+
*/
|
|
9
|
+
import { NodeTypeRegistry } from './core/nodes/registry.js';
|
|
10
|
+
import { hasBundledDefinition } from './flow-definitions.js';
|
|
11
|
+
import { dataFabricFlowFamily } from './nodes/data-fabric/flow/family.js';
|
|
12
|
+
import { delayFlowFamily } from './nodes/delay/flow/family.js';
|
|
13
|
+
import { documentFlowFamily } from './nodes/document/flow/family.js';
|
|
14
|
+
import { mockFlowFamily } from './nodes/mock/flow/family.js';
|
|
15
|
+
import { scriptFlowFamily } from './nodes/script/flow/family.js';
|
|
16
|
+
import { transformFlowFamily } from './nodes/transform/flow/family.js';
|
|
17
|
+
/** The families, in no significant order. Adding one is the whole of registering it. */
|
|
18
|
+
export const FLOW_NODE_FAMILIES = [dataFabricFlowFamily, delayFlowFamily, documentFlowFamily, mockFlowFamily, scriptFlowFamily, transformFlowFamily];
|
|
19
|
+
export const FLOW_NODE_TYPES = new NodeTypeRegistry('flow', FLOW_NODE_FAMILIES, { hasBundledDefinition });
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Flow specialization of the node-type contract (`core/nodes/`), and the
|
|
3
|
+
* contexts Flow lends a node type for each job. docs/NODE_TYPE_ARCHITECTURE_DESIGN.md
|
|
4
|
+
* §4.1–§4.3.
|
|
5
|
+
*
|
|
6
|
+
* A Flow node type serializes to a {@link FlowNodeContribution} — the same contract
|
|
7
|
+
* a custom `FlowAction.contribute()` returns, plus the two things built-in node
|
|
8
|
+
* types need and custom ones never had (`model`, `port`). The serializer still
|
|
9
|
+
* owns the node's id, label, `typeVersion`, layout, edges and definition dedupe;
|
|
10
|
+
* each context below is the whole of what a node type can see.
|
|
11
|
+
*/
|
|
12
|
+
import type { ArtifactContexts, NodeType } from './core/nodes/node-type.js';
|
|
13
|
+
import type { VersionedNodeType } from './core/nodes/versioned.js';
|
|
14
|
+
import type { NodeFamily, Placement } from './core/nodes/family.js';
|
|
15
|
+
import type { DefinitionReference, NodeContribution } from './core/node-classes.js';
|
|
16
|
+
import type { CheckOpts } from './check.js';
|
|
17
|
+
/**
|
|
18
|
+
* What a Flow node type's `serialize` returns: the node's type-owned fields.
|
|
19
|
+
*
|
|
20
|
+
* The `inputs`, `outputs` and `bindings` are a {@link NodeContribution}'s; only
|
|
21
|
+
* `definition` differs (optional here), and `model` and `port` are Flow's own.
|
|
22
|
+
*
|
|
23
|
+
* A node type owns its bindings: together with what it hoists through
|
|
24
|
+
* `ctx.bind`, they must close every `<bindings.NAME>` its definition references.
|
|
25
|
+
* `serialize` enforces that (#942); `check` does not verify it, because the
|
|
26
|
+
* bindings exist only once the type serializes and no author input can open the
|
|
27
|
+
* gap, so the type's own tests are what pin it.
|
|
28
|
+
*/
|
|
29
|
+
export interface FlowNodeContribution extends Omit<NodeContribution, 'definition'> {
|
|
30
|
+
/**
|
|
31
|
+
* The definition to compile against. A `bundled` type must omit it: the
|
|
32
|
+
* serializer resolves `<typeName>@<version>` from the bundle, and refuses one
|
|
33
|
+
* returned. A `per-tenant` type must supply the definition it built (a
|
|
34
|
+
* `snapshot` reference).
|
|
35
|
+
*/
|
|
36
|
+
definition?: DefinitionReference;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the node carries the definition's `model` (`'definition'`, the default)
|
|
39
|
+
* or none (`'omit'`) — Data Fabric nodes never carry one (see `makeNode`).
|
|
40
|
+
*/
|
|
41
|
+
model?: 'definition' | 'omit';
|
|
42
|
+
/** The forward port the next step's edge leaves from. Default: the definition's default source handle. */
|
|
43
|
+
port?: string;
|
|
44
|
+
}
|
|
45
|
+
/** What `serialize` may ask of the serializer, for one placement. */
|
|
46
|
+
export interface FlowSerializeContext {
|
|
47
|
+
/** The step name the author gave this node. */
|
|
48
|
+
readonly step: string;
|
|
49
|
+
/**
|
|
50
|
+
* The version being emitted, always set: the author's `{ version }` when the step
|
|
51
|
+
* names one, else what `select()` or the default chose. It does not say whether
|
|
52
|
+
* the author pinned it.
|
|
53
|
+
*/
|
|
54
|
+
readonly version: string;
|
|
55
|
+
/** Render one value (an `Expr`, or a literal) as the file stores it, with this scope's rename map. */
|
|
56
|
+
render(value: unknown): unknown;
|
|
57
|
+
/**
|
|
58
|
+
* Apply this scope's rename map to raw JavaScript that is not an `Expr` — a
|
|
59
|
+
* script body reads `$vars.<step>` like any expression, so a reused child's
|
|
60
|
+
* body must follow its copy's node ids too.
|
|
61
|
+
*/
|
|
62
|
+
renameRefs(js: string): string;
|
|
63
|
+
/** The node id another step of this scope was emitted under — rename-aware, for subflow copies. */
|
|
64
|
+
stepNodeId(step: string): string;
|
|
65
|
+
/** A deterministic id for `seed`, unique to this flow and node. */
|
|
66
|
+
mint(seed: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Hoist a binding entry into the flow's `bindings`, deduplicated by `id`. With
|
|
69
|
+
* the contribution's own `bindings`, these must close every `<bindings.NAME>`
|
|
70
|
+
* the node's definition references: serialize refuses a name left open
|
|
71
|
+
* (`CONTRIBUTION_BINDING_UNRESOLVED`), and `check` does not see bindings.
|
|
72
|
+
*/
|
|
73
|
+
bind(entry: {
|
|
74
|
+
readonly id: string;
|
|
75
|
+
} & Readonly<Record<string, unknown>>): void;
|
|
76
|
+
/** The bundled definition `<typeName>@<version>`, or undefined when the SDK does not ship it. */
|
|
77
|
+
definition(typeName: string, version: string): unknown;
|
|
78
|
+
}
|
|
79
|
+
/** What `deserialize` may ask of the decompiler, for one serialized node. */
|
|
80
|
+
export interface FlowDeserializeContext {
|
|
81
|
+
/** The serialized node's id. */
|
|
82
|
+
readonly nodeId: string;
|
|
83
|
+
/** A serialized value back as the spec holds it: `=js:` text becomes an `Expr`; a literal stays itself. */
|
|
84
|
+
expr(raw: unknown): unknown;
|
|
85
|
+
/**
|
|
86
|
+
* A serialized value's TEXT, unwrapped from an expression envelope: a string
|
|
87
|
+
* as is, a `{ type: 'jsExpression', expression }` envelope as `=js:<expression>`,
|
|
88
|
+
* any other envelope as its expression; undefined for anything else.
|
|
89
|
+
*/
|
|
90
|
+
sourceText(raw: unknown): string | undefined;
|
|
91
|
+
/** A plain value, unwrapped from a `{ type: 'literal', expression: '<json>' }` envelope when it is one. */
|
|
92
|
+
plainValue(raw: unknown): unknown;
|
|
93
|
+
/** The step name a node id was emitted for. */
|
|
94
|
+
stepName(nodeId: string): string;
|
|
95
|
+
/** The file's own `definitions[]` entry for this node, if it carries one. */
|
|
96
|
+
definition(): unknown;
|
|
97
|
+
/** Report something the lift could not keep. Decompile prints it once. */
|
|
98
|
+
warn(message: string): void;
|
|
99
|
+
}
|
|
100
|
+
/** What `print` may ask of the decompiler. Every method returns source text. */
|
|
101
|
+
export interface FlowPrintContext {
|
|
102
|
+
/**
|
|
103
|
+
* Any spec value as source: an `Expr` as the helper an author writes (`input('x')`, `js\`…\``), an array or
|
|
104
|
+
* plain object recursively (`[a, b]`, `{ k: v }`), anything else as a literal.
|
|
105
|
+
*/
|
|
106
|
+
value(value: unknown): string;
|
|
107
|
+
/** A string literal. */
|
|
108
|
+
string(text: string): string;
|
|
109
|
+
/** Any JSON value as a literal, verbatim (`{"a":1}`), where the source writes the value as data. */
|
|
110
|
+
json(value: unknown): string;
|
|
111
|
+
/** An object key: a bare identifier when legal, otherwise a quoted string. */
|
|
112
|
+
key(name: string): string;
|
|
113
|
+
/** An authoring helper (`lit`, `input`, …) by name: imported into the printed source, and its identifier. */
|
|
114
|
+
helper(name: string): string;
|
|
115
|
+
}
|
|
116
|
+
/** What a node-local `check` may ask of the checker. */
|
|
117
|
+
export interface FlowCheckContext {
|
|
118
|
+
/** The step being checked. */
|
|
119
|
+
readonly step: string;
|
|
120
|
+
/** The version the node will be emitted at. */
|
|
121
|
+
readonly version: string;
|
|
122
|
+
/** Report a diagnostic on this step. Its severity is the family catalog's for `code`. */
|
|
123
|
+
report(code: string, message: string, suggestion?: string): void;
|
|
124
|
+
/**
|
|
125
|
+
* The flow input or variable a bare reference (`$vars.x`, or an input's
|
|
126
|
+
* `$vars.<trigger>.output.x`) names, with its declared type when it has one;
|
|
127
|
+
* undefined for anything else — a step output's type is not known offline.
|
|
128
|
+
*/
|
|
129
|
+
declaredRef(js: string): {
|
|
130
|
+
name: string;
|
|
131
|
+
type: string | undefined;
|
|
132
|
+
} | undefined;
|
|
133
|
+
/** The options `check` was called with (the connector-library views among them). */
|
|
134
|
+
readonly options: CheckOpts;
|
|
135
|
+
}
|
|
136
|
+
/** What a family-level `check` may ask of the checker. */
|
|
137
|
+
export interface FlowFamilyCheckContext {
|
|
138
|
+
/** Report a diagnostic on `step`. Its severity is the family catalog's for `code`. */
|
|
139
|
+
report(step: string, code: string, message: string, suggestion?: string): void;
|
|
140
|
+
/** Whether the flow has a step of that name, in any scope the family's placements can see. */
|
|
141
|
+
hasStep(step: string): boolean;
|
|
142
|
+
/** Where a step of that name is placed, when it is one of this registry's node types. */
|
|
143
|
+
placementOf(step: string): Placement | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Whether that step is one of this registry's node types whose `{ version }` did
|
|
146
|
+
* not resolve. It has no placement, and `NODE_VERSION_UNREGISTERED` already
|
|
147
|
+
* reports it, so a rule about it should stay silent rather than say it is missing.
|
|
148
|
+
*/
|
|
149
|
+
versionUnresolved(step: string): boolean;
|
|
150
|
+
}
|
|
151
|
+
export interface FlowContexts extends ArtifactContexts {
|
|
152
|
+
serialize: FlowSerializeContext;
|
|
153
|
+
deserialize: FlowDeserializeContext;
|
|
154
|
+
print: FlowPrintContext;
|
|
155
|
+
check: FlowCheckContext;
|
|
156
|
+
familyCheck: FlowFamilyCheckContext;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* What `rawNode` reports for a raw node of a registered type: the typed spelling
|
|
160
|
+
* to prefer (RAW_NODE_TYPED_FAMILY), and the inputs the product never reads
|
|
161
|
+
* (RAW_NODE_UNKNOWN_INPUT). Both apply to every version, registered or not —
|
|
162
|
+
* a raw node is often how an author reaches a version the SDK does not bundle.
|
|
163
|
+
*/
|
|
164
|
+
export interface FlowRawNodeAdvice {
|
|
165
|
+
/** The typed spelling the warning names, e.g. `dataFabricRead({ entity, … })`. */
|
|
166
|
+
readonly factory: string;
|
|
167
|
+
/** Appended to the warning: what the factory writes, and what still needs a raw node. */
|
|
168
|
+
readonly hint?: string;
|
|
169
|
+
/**
|
|
170
|
+
* A raw node's inputs carry a key the product never reads: an `error` at a version
|
|
171
|
+
* the SDK bundles (`bundled`), where the key set is known, else a `warning`.
|
|
172
|
+
*/
|
|
173
|
+
inputProblem?(inputs: unknown, version: string, bundled: boolean): {
|
|
174
|
+
severity: 'error' | 'warning';
|
|
175
|
+
message: string;
|
|
176
|
+
} | undefined;
|
|
177
|
+
}
|
|
178
|
+
/** One Flow node type at one version. */
|
|
179
|
+
export interface FlowNodeType<Spec> extends NodeType<Spec, FlowNodeContribution, FlowContexts> {
|
|
180
|
+
/**
|
|
181
|
+
* The node-level `model` every node of this type carries, whichever path emits
|
|
182
|
+
* it — this type's `serialize`, or a `rawNode` of its definition. `'omit'`: none
|
|
183
|
+
* (Data Fabric). Default `'definition'`; a contribution's own `model` wins.
|
|
184
|
+
*/
|
|
185
|
+
readonly nodeModel?: 'definition' | 'omit';
|
|
186
|
+
/** What `rawNode` reports for a raw node of this type. */
|
|
187
|
+
readonly rawNode?: FlowRawNodeAdvice;
|
|
188
|
+
}
|
|
189
|
+
/** A Flow node type with several versions. */
|
|
190
|
+
export type FlowVersionedNodeType<Spec> = VersionedNodeType<Spec, FlowNodeContribution, FlowContexts, FlowNodeType<Spec>>;
|
|
191
|
+
/** A Flow node family. */
|
|
192
|
+
export type FlowNodeFamily = NodeFamily<FlowContexts>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/flow-sdk.d.ts
CHANGED
|
@@ -18,11 +18,18 @@
|
|
|
18
18
|
*/
|
|
19
19
|
export * from './core/expr.js';
|
|
20
20
|
export * from './core/actions.js';
|
|
21
|
+
export * from './nodes/data-fabric/flow/index.js';
|
|
22
|
+
export * from './nodes/delay/flow/index.js';
|
|
23
|
+
export * from './nodes/document/flow/index.js';
|
|
24
|
+
export * from './nodes/mock/flow/index.js';
|
|
25
|
+
export * from './nodes/script/flow/index.js';
|
|
26
|
+
export * from './nodes/transform/flow/index.js';
|
|
21
27
|
export { resolveFlowRefs, resolveRefPath, hasFileRefs } from './ref-resolve.js';
|
|
22
28
|
export type { RefReader, ResolveRefsOptions } from './ref-resolve.js';
|
|
23
29
|
export * from './core/connectors.js';
|
|
24
30
|
export * from './core/lookups.js';
|
|
25
31
|
export * from './core/node-classes.js';
|
|
32
|
+
export * from './raw-node.js';
|
|
26
33
|
import { Expr } from './core/expr.js';
|
|
27
34
|
import type { ErrorEnvelopeField, TypeDesc } from './core/expr.js';
|
|
28
35
|
import type { ActionSpec, EventSubscription, TriggerOptions } from './core/actions.js';
|
|
@@ -330,6 +337,13 @@ export type CaseValue = string | number | boolean;
|
|
|
330
337
|
export interface SwitchArm {
|
|
331
338
|
value: CaseValue;
|
|
332
339
|
label?: string;
|
|
340
|
+
/**
|
|
341
|
+
* The case's wire id — `inputs.cases[].id`, and the `case-<id>` port its arm
|
|
342
|
+
* leaves from. Omitted, it is positional (`case_1`, `case_2`, …). Set it only
|
|
343
|
+
* to keep an id a flow already has (decompile does, for a designer-drawn
|
|
344
|
+
* switch whose ids are `default-1`, …).
|
|
345
|
+
*/
|
|
346
|
+
id?: string;
|
|
333
347
|
body: Step[];
|
|
334
348
|
}
|
|
335
349
|
/**
|
|
@@ -513,6 +527,14 @@ export type Step = {
|
|
|
513
527
|
| {
|
|
514
528
|
kind: 'break';
|
|
515
529
|
}
|
|
530
|
+
/**
|
|
531
|
+
* Go on to the enclosing loop/do-while's next iteration through its continue
|
|
532
|
+
* handle — the edge a body's last step gets. Terminal on its path. Only valid
|
|
533
|
+
* inside a container body.
|
|
534
|
+
*/
|
|
535
|
+
| {
|
|
536
|
+
kind: 'continue';
|
|
537
|
+
}
|
|
516
538
|
/**
|
|
517
539
|
* A fan-out and its join. `arms` is one step list per arm — an ARRAY, because
|
|
518
540
|
* arms are positional and carry no author-supplied keys — and `name` names the
|
|
@@ -951,7 +973,8 @@ declare class StepList {
|
|
|
951
973
|
* @param name - The switch node's id.
|
|
952
974
|
* @param on - The value to compare each case against.
|
|
953
975
|
* @param cases - One entry per arm, evaluated top to bottom; the first strict
|
|
954
|
-
* match wins. `label` names the arm's outgoing edge.
|
|
976
|
+
* match wins. `label` names the arm's outgoing edge. `id` keeps a case's wire
|
|
977
|
+
* id (`inputs.cases[].id`, port `case-<id>`); omitted, it is `case_<n>`.
|
|
955
978
|
* @param defaultFn - Receives a sub-builder for the arm taken when nothing
|
|
956
979
|
* matches. Omit it and an unmatched value simply continues.
|
|
957
980
|
* @param options - Node options; `version` selects the exact definition
|
|
@@ -962,6 +985,7 @@ declare class StepList {
|
|
|
962
985
|
value: CaseValue;
|
|
963
986
|
body: (b: ArmBuilder) => void;
|
|
964
987
|
label?: string;
|
|
988
|
+
id?: string;
|
|
965
989
|
}[], defaultFn?: (b: StepList) => void, options?: NodeOptions): this;
|
|
966
990
|
/**
|
|
967
991
|
* Run two or more arms **in parallel** from this point and join them back
|
|
@@ -1046,6 +1070,21 @@ declare class StepList {
|
|
|
1046
1070
|
* @returns This builder. Nothing after this call on the same path can run.
|
|
1047
1071
|
*/
|
|
1048
1072
|
break(): this;
|
|
1073
|
+
/**
|
|
1074
|
+
* Go on to the **next iteration** of the enclosing `.loop()` / `.doWhile()`
|
|
1075
|
+
* through its continue handle — the edge the body's last step gets anyway.
|
|
1076
|
+
* Use it where a path would otherwise end the run: an `.onError()` handler or
|
|
1077
|
+
* an HTTP-branch / outcome list inside the body ends on an End node of its own
|
|
1078
|
+
* unless it says where to go, so "log the failure and skip this item" is
|
|
1079
|
+
* `.onError((h) => h.step('log', …).continue())`. Terminal on its path, like
|
|
1080
|
+
* `.break()`. Compilation fails when there is no enclosing container.
|
|
1081
|
+
*
|
|
1082
|
+
* Not `.stepToRef('<loop>')`: that names the loop as a step and enters it from
|
|
1083
|
+
* its outer input — it restarts the loop, it does not go on to the next item.
|
|
1084
|
+
*
|
|
1085
|
+
* @returns This builder. Nothing after this call on the same path can run.
|
|
1086
|
+
*/
|
|
1087
|
+
continue(): this;
|
|
1049
1088
|
/**
|
|
1050
1089
|
* Stop the **whole run**, here and now — not just this path.
|
|
1051
1090
|
*
|
package/dist/flow-sdk.js
CHANGED
|
@@ -21,12 +21,20 @@
|
|
|
21
21
|
// single import an author needs.
|
|
22
22
|
export * from './core/expr.js';
|
|
23
23
|
export * from './core/actions.js';
|
|
24
|
+
// Node families' public surfaces (docs/NODE_TYPE_ARCHITECTURE_DESIGN.md §8).
|
|
25
|
+
export * from './nodes/data-fabric/flow/index.js';
|
|
26
|
+
export * from './nodes/delay/flow/index.js';
|
|
27
|
+
export * from './nodes/document/flow/index.js';
|
|
28
|
+
export * from './nodes/mock/flow/index.js';
|
|
29
|
+
export * from './nodes/script/flow/index.js';
|
|
30
|
+
export * from './nodes/transform/flow/index.js';
|
|
24
31
|
// `$ref`-split ingestion (design §5): decompile resolves local-file refs into
|
|
25
32
|
// one object model. Exported so a host doing its own file reading can too.
|
|
26
33
|
export { resolveFlowRefs, resolveRefPath, hasFileRefs } from './ref-resolve.js';
|
|
27
34
|
export * from './core/connectors.js';
|
|
28
35
|
export * from './core/lookups.js';
|
|
29
36
|
export * from './core/node-classes.js';
|
|
37
|
+
export * from './raw-node.js';
|
|
30
38
|
import { err as errRef, toExpr, types } from './core/expr.js';
|
|
31
39
|
import { builtinActionSpec, builtinTriggerSpec, subscriptionFrom } from './core/actions.js';
|
|
32
40
|
import { checkFlowExpressions, FlowBuildError } from './flow-expr-check.js';
|
|
@@ -609,7 +617,8 @@ class StepList {
|
|
|
609
617
|
* @param name - The switch node's id.
|
|
610
618
|
* @param on - The value to compare each case against.
|
|
611
619
|
* @param cases - One entry per arm, evaluated top to bottom; the first strict
|
|
612
|
-
* match wins. `label` names the arm's outgoing edge.
|
|
620
|
+
* match wins. `label` names the arm's outgoing edge. `id` keeps a case's wire
|
|
621
|
+
* id (`inputs.cases[].id`, port `case-<id>`); omitted, it is `case_<n>`.
|
|
613
622
|
* @param defaultFn - Receives a sub-builder for the arm taken when nothing
|
|
614
623
|
* matches. Omit it and an unmatched value simply continues.
|
|
615
624
|
* @param options - Node options; `version` selects the exact definition
|
|
@@ -627,7 +636,7 @@ class StepList {
|
|
|
627
636
|
// An arm's own `.label(...)` wins over the case config's `label`; either
|
|
628
637
|
// overrides the serializer's derived `Case "<value>"`.
|
|
629
638
|
const label = arm.armLabel ?? c.label;
|
|
630
|
-
return { value: c.value, ...(label !== undefined ? { label } : {}), body: arm.steps };
|
|
639
|
+
return { value: c.value, ...(label !== undefined ? { label } : {}), ...(c.id !== undefined ? { id: c.id } : {}), body: arm.steps };
|
|
631
640
|
});
|
|
632
641
|
let dflt;
|
|
633
642
|
if (defaultFn) {
|
|
@@ -757,6 +766,24 @@ class StepList {
|
|
|
757
766
|
this.steps.push({ kind: 'break' });
|
|
758
767
|
return this;
|
|
759
768
|
}
|
|
769
|
+
/**
|
|
770
|
+
* Go on to the **next iteration** of the enclosing `.loop()` / `.doWhile()`
|
|
771
|
+
* through its continue handle — the edge the body's last step gets anyway.
|
|
772
|
+
* Use it where a path would otherwise end the run: an `.onError()` handler or
|
|
773
|
+
* an HTTP-branch / outcome list inside the body ends on an End node of its own
|
|
774
|
+
* unless it says where to go, so "log the failure and skip this item" is
|
|
775
|
+
* `.onError((h) => h.step('log', …).continue())`. Terminal on its path, like
|
|
776
|
+
* `.break()`. Compilation fails when there is no enclosing container.
|
|
777
|
+
*
|
|
778
|
+
* Not `.stepToRef('<loop>')`: that names the loop as a step and enters it from
|
|
779
|
+
* its outer input — it restarts the loop, it does not go on to the next item.
|
|
780
|
+
*
|
|
781
|
+
* @returns This builder. Nothing after this call on the same path can run.
|
|
782
|
+
*/
|
|
783
|
+
continue() {
|
|
784
|
+
this.steps.push({ kind: 'continue' });
|
|
785
|
+
return this;
|
|
786
|
+
}
|
|
760
787
|
/**
|
|
761
788
|
* Stop the **whole run**, here and now — not just this path.
|
|
762
789
|
*
|
package/dist/flow-step-tree.js
CHANGED
|
@@ -9,7 +9,7 @@ export function stopsAtEnd(steps) {
|
|
|
9
9
|
|| (st.kind === 'branch' && (has(st.then, kinds) || has(st.otherwise, kinds)))
|
|
10
10
|
|| ((st.kind === 'switch' || st.kind === 'stepSwitch') && st.cases.some((c) => has(c.body, kinds)))
|
|
11
11
|
|| (st.kind === 'switch' && st.default !== undefined && has(st.default, kinds)));
|
|
12
|
-
return has(steps, new Set(['return'])) && !has(steps, new Set(['terminate', 'break']));
|
|
12
|
+
return has(steps, new Set(['return'])) && !has(steps, new Set(['terminate', 'break', 'continue']));
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* The step lists nested DIRECTLY inside `step` — the bodies a walk over this
|
|
@@ -37,6 +37,7 @@ export function childStepLists(step) {
|
|
|
37
37
|
return step.arms;
|
|
38
38
|
case 'action':
|
|
39
39
|
case 'break':
|
|
40
|
+
case 'continue':
|
|
40
41
|
case 'terminate':
|
|
41
42
|
case 'stepToRef':
|
|
42
43
|
case 'return':
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,8 @@ export type { EmitFlowOpts } from './emit.js';
|
|
|
14
14
|
export { decompile as decompileFlow } from './decompile.js';
|
|
15
15
|
export type { DecompileOptions as FlowDecompileOptions } from './decompile.js';
|
|
16
16
|
export { mergeFlow } from './merge.js';
|
|
17
|
-
export type { MergeOptions as FlowMergeOptions } from './merge.js';
|
|
17
|
+
export type { MergeOptions as FlowMergeOptions, MergeFinding as FlowMergeFinding } from './merge.js';
|
|
18
|
+
export { MergeRefusedError as FlowMergeRefusedError } from './merge.js';
|
|
18
19
|
export { Library } from './library.js';
|
|
19
20
|
export { Bindings } from './bindings.js';
|
|
20
21
|
export { check } from './check.js';
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { serialize } from './serialize.js';
|
|
|
18
18
|
export { emitFlow } from './emit.js';
|
|
19
19
|
export { decompile as decompileFlow } from './decompile.js';
|
|
20
20
|
export { mergeFlow } from './merge.js';
|
|
21
|
+
export { MergeRefusedError as FlowMergeRefusedError } from './merge.js';
|
|
21
22
|
export { Library } from './library.js';
|
|
22
23
|
export { Bindings } from './bindings.js';
|
|
23
24
|
export { check } from './check.js';
|
package/dist/merge-cli.js
CHANGED
|
@@ -3,23 +3,25 @@
|
|
|
3
3
|
* merge-cli — merge an edited flow back into the original `.flow` (bin `flow-merge`)
|
|
4
4
|
*
|
|
5
5
|
* Usage:
|
|
6
|
-
* flow-merge <original.flow> <edited.flow> [-o merged.flow] [--baseline <baseline.flow>]
|
|
6
|
+
* flow-merge <original.flow> <edited.flow> [-o merged.flow] [--baseline <baseline.flow>] [--strict]
|
|
7
7
|
*
|
|
8
8
|
* `edited.flow` is compile(decompile(original) after your edits). `--baseline`
|
|
9
9
|
* is compile(decompile(original)) BEFORE any edit — supplying it enables the
|
|
10
10
|
* delta merge (untouched nodes keep their original content, placeholder-safe);
|
|
11
11
|
* omit it for a two-way merge (take the edited graph, re-attach original layout).
|
|
12
|
-
*
|
|
12
|
+
* With `--baseline`, every wire-identity difference between the baseline and
|
|
13
|
+
* the original (what the no-edit round trip changed) is printed as a warning;
|
|
14
|
+
* `--strict` refuses instead (exit 1, nothing written). See merge.ts.
|
|
13
15
|
*/
|
|
14
16
|
import { reportResult } from './cli-result.js';
|
|
15
17
|
import { writeJsonFile } from './core/json-file.js';
|
|
16
18
|
import { readFileSync } from 'node:fs';
|
|
17
19
|
import { basename, resolve } from 'node:path';
|
|
18
|
-
import { mergeFlow } from './merge.js';
|
|
20
|
+
import { MergeRefusedError, mergeFlow } from './merge.js';
|
|
19
21
|
import { flagValue, runWhenInvokedDirectly } from './cli-run.js';
|
|
20
22
|
export function run(argv) {
|
|
21
23
|
if (argv.length === 0 || argv[0] === '-h' || argv[0] === '--help') {
|
|
22
|
-
console.error('usage: flow-merge <original.flow> <edited.flow> [-o merged.flow] [--baseline <baseline.flow>]');
|
|
24
|
+
console.error('usage: flow-merge <original.flow> <edited.flow> [-o merged.flow] [--baseline <baseline.flow>] [--strict]');
|
|
23
25
|
return 2;
|
|
24
26
|
}
|
|
25
27
|
const flags = new Set(['-o', '--baseline']);
|
|
@@ -33,10 +35,25 @@ export function run(argv) {
|
|
|
33
35
|
const edited = JSON.parse(readFileSync(editedPath, 'utf8'));
|
|
34
36
|
const baselinePath = flagValue(argv, '--baseline');
|
|
35
37
|
const baseline = baselinePath ? JSON.parse(readFileSync(baselinePath, 'utf8')) : undefined;
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const strict = argv.includes('--strict');
|
|
39
|
+
if (strict && !baseline) {
|
|
40
|
+
console.error('flow-merge: --strict compares the no-edit round trip with the original; pass --baseline <baseline.flow>');
|
|
41
|
+
return 2;
|
|
42
|
+
}
|
|
43
|
+
let merged;
|
|
44
|
+
try {
|
|
45
|
+
merged = mergeFlow(original, edited, {
|
|
46
|
+
baseline,
|
|
47
|
+
strict,
|
|
48
|
+
warn: (m) => console.error(`flow-merge: warning: ${m}`),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
if (!(error instanceof MergeRefusedError))
|
|
53
|
+
throw error;
|
|
54
|
+
console.error(`flow-merge: ${error.message}`);
|
|
55
|
+
return 1;
|
|
56
|
+
}
|
|
40
57
|
const out = flagValue(argv, '-o') ?? 'merged.flow';
|
|
41
58
|
writeJsonFile(out, merged);
|
|
42
59
|
console.log(`flow-merge: wrote ${basename(out)} (${(merged.nodes ?? []).length} nodes, ${(merged.edges ?? []).length} edges)`);
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/** A node as merge sees it: only the fields these checks read. */
|
|
2
|
+
interface RtNode {
|
|
3
|
+
id: string;
|
|
4
|
+
type: string;
|
|
5
|
+
typeVersion?: string;
|
|
6
|
+
inputs?: Record<string, unknown>;
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
/** An edge as merge sees it. */
|
|
10
|
+
interface RtEdge {
|
|
11
|
+
id?: string;
|
|
12
|
+
sourceNodeId: string;
|
|
13
|
+
sourcePort: string;
|
|
14
|
+
targetNodeId: string;
|
|
15
|
+
targetPort: string;
|
|
16
|
+
[k: string]: unknown;
|
|
17
|
+
}
|
|
18
|
+
/** A `.flow` file as merge sees it. */
|
|
19
|
+
interface RtFlow {
|
|
20
|
+
nodes?: RtNode[];
|
|
21
|
+
edges?: RtEdge[];
|
|
22
|
+
definitions?: Array<{
|
|
23
|
+
nodeType?: string;
|
|
24
|
+
[k: string]: unknown;
|
|
25
|
+
}>;
|
|
26
|
+
subflows?: Record<string, unknown>;
|
|
27
|
+
bindings?: Array<{
|
|
28
|
+
id?: string;
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
}>;
|
|
31
|
+
[k: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
/** One difference, or one inconsistency in the merged file. */
|
|
34
|
+
export interface MergeFinding {
|
|
35
|
+
/** Which comparison found it. */
|
|
36
|
+
kind: 'node-removed' | 'node-added' | 'node-type' | 'implicit-end' | 'edge-handle-renamed' | 'edge-rewired' | 'edge-removed' | 'edge-added' | 'handle-ids' | 'binding-removed' | 'binding-added' | 'undeclared-handle' | 'duplicate-binding';
|
|
37
|
+
/** The finding, phrased for the author, naming the node, edge or row. */
|
|
38
|
+
message: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether `strict` refuses the merge over it. False for `implicit-end` and
|
|
41
|
+
* `binding-removed`, which leave the merged file doing what the original does.
|
|
42
|
+
*/
|
|
43
|
+
refuses: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Every wire-identity difference between the original and its no-edit round
|
|
47
|
+
* trip that the merged file still carries, phrased as what the merge writes.
|
|
48
|
+
*
|
|
49
|
+
* A difference the author's edit undid is not reported: an edge the round trip
|
|
50
|
+
* dropped that the merged file has again, an edge or node the round trip added
|
|
51
|
+
* that the merged file lacks, a node whose type or handles the round trip
|
|
52
|
+
* changed that the merged file no longer has (or has with the original's).
|
|
53
|
+
*
|
|
54
|
+
* @param original - The file being merged into.
|
|
55
|
+
* @param baseline - compile(decompile(original)) before any edit.
|
|
56
|
+
* @param merged - The merged file, before it is written.
|
|
57
|
+
* @returns One finding per difference, in a stable order.
|
|
58
|
+
*/
|
|
59
|
+
export declare function roundTripFindings(original: RtFlow, baseline: RtFlow, merged: RtFlow): MergeFinding[];
|
|
60
|
+
/**
|
|
61
|
+
* Inconsistencies in the merged file that come from mixing its sources: a root
|
|
62
|
+
* edge leaving a handle its source node does not declare, and two binding rows
|
|
63
|
+
* binding the same resource property.
|
|
64
|
+
*
|
|
65
|
+
* A node with no definition in `merged.definitions` (a sticky note, a type
|
|
66
|
+
* neither input carried) is not judged. Neither is anything the original
|
|
67
|
+
* already had — an edge it carries verbatim, or as many same-identity binding
|
|
68
|
+
* rows as it already holds — because the merge did not cause it.
|
|
69
|
+
*
|
|
70
|
+
* @param merged - The merged file.
|
|
71
|
+
* @param original - The file merged into.
|
|
72
|
+
* @returns One finding per inconsistency.
|
|
73
|
+
*/
|
|
74
|
+
export declare function mergedFileFindings(merged: RtFlow, original?: RtFlow): MergeFinding[];
|
|
75
|
+
/** Thrown by `mergeFlow` under `strict` when a finding refuses the merge. */
|
|
76
|
+
export declare class MergeRefusedError extends Error {
|
|
77
|
+
/** Every refusing finding, in report order. */
|
|
78
|
+
readonly findings: readonly MergeFinding[];
|
|
79
|
+
constructor(findings: readonly MergeFinding[]);
|
|
80
|
+
}
|
|
81
|
+
export {};
|