@uipath/maestro-builder-sdk 6.17.6 → 6.18.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/bindings-v2.js +15 -17
- package/dist/bpmn/bpmn-sdk.js +3 -2
- package/dist/bpmn/check.js +3 -2
- package/dist/bpmn/decompile.js +123 -137
- package/dist/bpmn/intsvc.js +7 -2
- package/dist/bpmn/serialize.js +1 -1
- package/dist/bpmn/typed-node.js +5 -4
- package/dist/case/compile-cli.js +1 -3
- package/dist/case/decompile.js +103 -109
- package/dist/case/entry-points.js +2 -1
- package/dist/case/merge.js +3 -5
- package/dist/case/serialize.js +1 -1
- package/dist/check.js +26 -10
- package/dist/core/ceql.js +5 -2
- package/dist/core/connector-inputs.js +4 -4
- package/dist/core/event-checks.js +17 -2
- package/dist/core/event-filters.d.ts +38 -4
- package/dist/core/event-filters.js +63 -7
- package/dist/core/expr.d.ts +1 -1
- package/dist/core/expr.js +3 -3
- package/dist/core/json-file.d.ts +2 -0
- package/dist/core/json-file.js +4 -0
- package/dist/core/library.js +2 -1
- package/dist/core/node-envelope.d.ts +1 -0
- package/dist/core/node-envelope.js +1 -1
- package/dist/core/own-entry.d.ts +9 -0
- package/dist/core/own-entry.js +11 -0
- package/dist/core/ts-literal.d.ts +22 -0
- package/dist/core/ts-literal.js +37 -0
- package/dist/core/typed-raw-node.js +4 -3
- package/dist/decompile.js +238 -255
- package/dist/merge.js +10 -12
- package/dist/registry/compat/pystr.d.ts +2 -0
- package/dist/registry/compat/pystr.js +35 -0
- package/dist/registry/compat/pyvalue.d.ts +16 -0
- package/dist/registry/compat/pyvalue.js +35 -0
- package/dist/registry/generators/markdown/pyvalue.d.ts +1 -4
- package/dist/registry/generators/markdown/pyvalue.js +2 -30
- package/dist/registry/generators/markdown/sections/inputs.js +3 -2
- package/dist/registry/generators/type-tree.d.ts +1 -7
- package/dist/registry/generators/type-tree.js +5 -22
- package/dist/registry/library-build/build.js +6 -6
- package/dist/registry/library-build/canonical.js +25 -25
- package/dist/registry/library-build/context.js +5 -5
- package/dist/registry/library-build/enrich.js +18 -18
- package/dist/registry/library-build/events.js +25 -24
- package/dist/registry/library-build/generic-expand.js +21 -20
- package/dist/registry/library-build/plan.js +8 -8
- package/dist/registry/library-build/py.d.ts +3 -10
- package/dist/registry/library-build/py.js +9 -52
- package/dist/registry/library-build/schema-action.js +6 -6
- package/dist/registry/prepare/event.js +2 -2
- package/dist/registry/prepare/source-import.js +2 -9
- package/dist/registry/prepare/source-labels.js +2 -9
- package/dist/registry/prepare/support.d.ts +2 -6
- package/dist/registry/prepare/support.js +3 -58
- package/dist/registry/pull-cli.js +6 -14
- package/dist/registry/search-cli.js +2 -2
- package/dist/schema-version.js +0 -1
- package/dist/serialize.js +86 -76
- package/package.json +2 -2
package/dist/bindings-v2.js
CHANGED
|
@@ -56,14 +56,12 @@
|
|
|
56
56
|
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
57
57
|
import { join } from 'node:path';
|
|
58
58
|
import { BindingRefusal, connectionConnectorConflictMessage } from './core/binding-messages.js';
|
|
59
|
+
import { isRecord } from './core/node-envelope.js';
|
|
59
60
|
/** The document version pack emits. */
|
|
60
61
|
const DOCUMENT_VERSION = '2.0';
|
|
61
62
|
/** The per-resource metadata version pack stamps. */
|
|
62
63
|
const BINDINGS_VERSION = '2.2';
|
|
63
|
-
function
|
|
64
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
65
|
-
}
|
|
66
|
-
function str(value) {
|
|
64
|
+
function nonEmptyString(value) {
|
|
67
65
|
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
68
66
|
}
|
|
69
67
|
/** `resource` values are spelled lower-case in a `.flow` and capitalised in the BPMN projection. */
|
|
@@ -77,7 +75,7 @@ function nodeDetail(node) {
|
|
|
77
75
|
}
|
|
78
76
|
/** The connection a node runs on: `connectionId`, else `connectionResourceId`. */
|
|
79
77
|
function nodeConnectionKey(detail) {
|
|
80
|
-
return
|
|
78
|
+
return nonEmptyString(detail.connectionId) ?? nonEmptyString(detail.connectionResourceId);
|
|
81
79
|
}
|
|
82
80
|
/**
|
|
83
81
|
* The connector a node's CONNECTION belongs to — not the connector the node is.
|
|
@@ -92,9 +90,9 @@ function nodeConnectionKey(detail) {
|
|
|
92
90
|
* `detail.connector` is its connection's connector.
|
|
93
91
|
*/
|
|
94
92
|
function nodeConnectionConnector(detail) {
|
|
95
|
-
const connector =
|
|
93
|
+
const connector = nonEmptyString(detail.connector);
|
|
96
94
|
if (connector === MANAGED_HTTP_CONNECTOR && isRecord(detail.bodyParameters)) {
|
|
97
|
-
return
|
|
95
|
+
return nonEmptyString(detail.bodyParameters.targetConnector) ?? connector;
|
|
98
96
|
}
|
|
99
97
|
return connector;
|
|
100
98
|
}
|
|
@@ -130,8 +128,8 @@ export function connectionConnectors(flow) {
|
|
|
130
128
|
return out;
|
|
131
129
|
const bound = new Set();
|
|
132
130
|
for (const b of Array.isArray(flow.bindings) ? flow.bindings.filter(isRecord) : []) {
|
|
133
|
-
const key =
|
|
134
|
-
if (key && isConnection(b.resource) &&
|
|
131
|
+
const key = nonEmptyString(b.resourceKey);
|
|
132
|
+
if (key && isConnection(b.resource) && nonEmptyString(b.propertyAttribute)?.toLowerCase() === 'connectionid')
|
|
135
133
|
bound.add(key);
|
|
136
134
|
}
|
|
137
135
|
const users = new Map();
|
|
@@ -146,7 +144,7 @@ export function connectionConnectors(flow) {
|
|
|
146
144
|
const byConnector = users.get(key) ?? new Map();
|
|
147
145
|
users.set(key, byConnector);
|
|
148
146
|
const steps = byConnector.get(connector) ?? [];
|
|
149
|
-
steps.push((isRecord(node.display) ?
|
|
147
|
+
steps.push((isRecord(node.display) ? nonEmptyString(node.display.label) : undefined) ?? nonEmptyString(node.id) ?? '?');
|
|
150
148
|
byConnector.set(connector, steps);
|
|
151
149
|
}
|
|
152
150
|
for (const [key, byConnector] of users) {
|
|
@@ -184,10 +182,10 @@ export function connectionResources(flow) {
|
|
|
184
182
|
// and pack does not carry it into the sidecar.
|
|
185
183
|
const byKey = new Map();
|
|
186
184
|
for (const binding of bindings) {
|
|
187
|
-
const key =
|
|
185
|
+
const key = nonEmptyString(binding.resourceKey);
|
|
188
186
|
if (!key || !isConnection(binding.resource))
|
|
189
187
|
continue;
|
|
190
|
-
if (
|
|
188
|
+
if (nonEmptyString(binding.propertyAttribute)?.toLowerCase() !== 'connectionid')
|
|
191
189
|
continue;
|
|
192
190
|
byKey.set(key, [...(byKey.get(key) ?? []), binding]);
|
|
193
191
|
}
|
|
@@ -214,8 +212,8 @@ export function connectionResources(flow) {
|
|
|
214
212
|
// maestro flow pack` (uip 1.202.0-dev) on both orders of the issue's repro: pack labels
|
|
215
213
|
// the resource after the earlier step's binding, like `ActivityName`.
|
|
216
214
|
const binding = candidates[0];
|
|
217
|
-
const displayLabel =
|
|
218
|
-
const label = isRecord(node.display) ?
|
|
215
|
+
const displayLabel = nonEmptyString(binding.name) ?? key;
|
|
216
|
+
const label = isRecord(node.display) ? nonEmptyString(node.display.label) : undefined;
|
|
219
217
|
resources.push({
|
|
220
218
|
resource: 'connection',
|
|
221
219
|
key,
|
|
@@ -223,13 +221,13 @@ export function connectionResources(flow) {
|
|
|
223
221
|
id: `connection${key}`,
|
|
224
222
|
value: {
|
|
225
223
|
ConnectionId: {
|
|
226
|
-
defaultValue:
|
|
224
|
+
defaultValue: nonEmptyString(binding.default) ?? key,
|
|
227
225
|
isExpression: false,
|
|
228
226
|
displayName: displayLabel,
|
|
229
227
|
},
|
|
230
228
|
},
|
|
231
229
|
metadata: {
|
|
232
|
-
ActivityName: label ??
|
|
230
|
+
ActivityName: label ?? nonEmptyString(node.id) ?? key,
|
|
233
231
|
BindingsVersion: BINDINGS_VERSION,
|
|
234
232
|
DisplayLabel: displayLabel,
|
|
235
233
|
UseConnectionService: 'true',
|
|
@@ -254,7 +252,7 @@ export function mergeBindingsV2(existing, connections) {
|
|
|
254
252
|
? existing.resources.filter(isRecord)
|
|
255
253
|
: [];
|
|
256
254
|
const preserved = previous.filter((r) => !isConnection(r.resource));
|
|
257
|
-
const version = (isRecord(existing) &&
|
|
255
|
+
const version = (isRecord(existing) && nonEmptyString(existing.version)) || DOCUMENT_VERSION;
|
|
258
256
|
return { version, resources: [...connections, ...preserved] };
|
|
259
257
|
}
|
|
260
258
|
/** Read a `bindings_v2.json`, or `undefined` when absent or unparseable. */
|
package/dist/bpmn/bpmn-sdk.js
CHANGED
|
@@ -4,6 +4,7 @@ import { BPMN_SCHEMA_VERSIONS } from './format-profile.js';
|
|
|
4
4
|
import { schemaVersionRefusal } from '../schema-version.js';
|
|
5
5
|
import { bindingRequiredFields, REGISTRY_GAPS, registryType } from './typed-node.js';
|
|
6
6
|
import { DATA_SERVICE_ACTIVITY_TYPE, DATA_SERVICE_CONNECTOR_KEY, dataServiceWire } from './data-service.js';
|
|
7
|
+
import { ownEntry } from '../core/own-entry.js';
|
|
7
8
|
export { BpmnBuildError } from './bpmn-expr-check.js';
|
|
8
9
|
// @internal helpers kept on the published /bpmn subpath; SDK code imports declared-vars.js.
|
|
9
10
|
export { connectorOutputVars, nodeDeclaredVars, typedNodeDeclaredVars } from './declared-vars.js';
|
|
@@ -1218,7 +1219,7 @@ class ScopeBuilder {
|
|
|
1218
1219
|
resource: field.bindingInfo?.resource ?? 'process',
|
|
1219
1220
|
propertyAttribute: field.bindingInfo?.propertyAttribute ?? field.name,
|
|
1220
1221
|
// A fact the registry omits and the validator enforces — see REGISTRY_GAPS.
|
|
1221
|
-
resourceSubType: REGISTRY_GAPS
|
|
1222
|
+
resourceSubType: ownEntry(REGISTRY_GAPS, type)?.resourceSubType,
|
|
1222
1223
|
default: value,
|
|
1223
1224
|
resourceKey: value,
|
|
1224
1225
|
});
|
|
@@ -1242,7 +1243,7 @@ class ScopeBuilder {
|
|
|
1242
1243
|
name: opts.process,
|
|
1243
1244
|
resource: 'process',
|
|
1244
1245
|
propertyAttribute: 'Key',
|
|
1245
|
-
resourceSubType: REGISTRY_GAPS
|
|
1246
|
+
resourceSubType: ownEntry(REGISTRY_GAPS, type)?.resourceSubType,
|
|
1246
1247
|
default: releaseKey,
|
|
1247
1248
|
resourceKey: releaseKey,
|
|
1248
1249
|
});
|
package/dist/bpmn/check.js
CHANGED
|
@@ -3,7 +3,8 @@ import { allNodes, folderCompanionKeys, implicitNodeVars, processId } from './se
|
|
|
3
3
|
import { KNOWN_METHOD_SET } from './known-methods.js';
|
|
4
4
|
import { EQUALS_EXPR_DIALECT, checkConnectorContract, checkConnectorLookups, checkConnectorSchema, checkBindingLabels, } from '../core/connector-checks.js';
|
|
5
5
|
import { checkEventResolution, checkEventSubscription, eventParamsFor, } from '../core/event-checks.js';
|
|
6
|
-
import { bindingRequiredFields, missingRequiredContext, missingRequiredInputs,
|
|
6
|
+
import { bindingRequiredFields, missingRequiredContext, missingRequiredInputs, REGISTRY_GAPS, registryType, unsatisfiableRequiredInputs, } from './typed-node.js';
|
|
7
|
+
import { ownEntry } from '../core/own-entry.js';
|
|
7
8
|
/**
|
|
8
9
|
* The job-start family — the types whose engine handler switches addressing on the
|
|
9
10
|
* `uipath:type` version: v2 reads `name`/`folderPath`, v1 reads `releaseKey`/`folderKey`.
|
|
@@ -1089,7 +1090,7 @@ inEventSubProcess = false) {
|
|
|
1089
1090
|
}
|
|
1090
1091
|
// A type that permits only the output row its spec declares. Reachable via
|
|
1091
1092
|
// the generic `.activity()`; the typed wrapper does not offer the option.
|
|
1092
|
-
if (REGISTRY_GAPS
|
|
1093
|
+
if (ownEntry(REGISTRY_GAPS, n.type)?.outputRowsFixed && Object.keys(n.outputs ?? {}).length) {
|
|
1093
1094
|
diags.push({
|
|
1094
1095
|
level: 'error',
|
|
1095
1096
|
code: 'OUTPUT_ROWS_FIXED',
|