@uipath/maestro-builder-sdk 6.32.6 → 6.32.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/case/compile-cli.js +2 -2
- package/dist/case/serialize.js +48 -4
- package/package.json +2 -2
package/dist/case/compile-cli.js
CHANGED
|
@@ -269,8 +269,8 @@ function syncEntryPoints(caseplan, outPath) {
|
|
|
269
269
|
* succeeds with zero warnings when the sidecar is stale or empty.
|
|
270
270
|
*
|
|
271
271
|
* Non-connector resources come from root binding pairs and referenced tasks.
|
|
272
|
-
*
|
|
273
|
-
*
|
|
272
|
+
* A connector's connection and folder relationship comes from the context[]
|
|
273
|
+
* that references both binding ids.
|
|
274
274
|
* No-op when compiling outside a scaffolded project.
|
|
275
275
|
*/
|
|
276
276
|
function syncBindingsV2(caseplan, outPath) {
|
package/dist/case/serialize.js
CHANGED
|
@@ -184,7 +184,7 @@ export function serialize(built, opts = {}) {
|
|
|
184
184
|
context.push(io('connection', 'string', { value: `=bindings.${connection.id}` }));
|
|
185
185
|
context.push(io('resourceKey', 'string', { value: connection.resourceKey }));
|
|
186
186
|
}
|
|
187
|
-
const folder =
|
|
187
|
+
const folder = folderBindingRef(resolver, connector.folder, connection, { ...site, attribute: 'folder' });
|
|
188
188
|
if (folder)
|
|
189
189
|
context.push(io('folderKey', 'string', { value: `=bindings.${folder.id}` }));
|
|
190
190
|
}
|
|
@@ -904,7 +904,7 @@ function resolvedSubscriptionBag(kind, spec, resolver, elementId, where) {
|
|
|
904
904
|
context.push(io('connection', 'string', { value: `=bindings.${connection.id}` }));
|
|
905
905
|
context.push(io('resourceKey', 'string', { value: connection.resourceKey }));
|
|
906
906
|
}
|
|
907
|
-
const folder =
|
|
907
|
+
const folder = folderBindingRef(resolver, spec.folder, connection, { attribute: 'folder', where, target });
|
|
908
908
|
if (folder)
|
|
909
909
|
context.push(io('folderKey', 'string', { value: `=bindings.${folder.id}` }));
|
|
910
910
|
context.push(io('method', 'string', {}), io('path', 'string', {}), io('objectName', 'string', { value: op.objectName ?? spec.event }), io('operation', 'string', { value: op.eventOperation ?? spec.event }), io('metadata', 'json', { body: subscriptionMetadata(rc, op, spec.filters ?? [], elementId) }));
|
|
@@ -1100,7 +1100,7 @@ function connectorTaskData(spec, resolver, elementId, where) {
|
|
|
1100
1100
|
context.push(io('connection', 'string', { value: `=bindings.${connRef.id}` }));
|
|
1101
1101
|
context.push(io('resourceKey', 'string', { value: connRef.resourceKey }));
|
|
1102
1102
|
}
|
|
1103
|
-
const folderRef =
|
|
1103
|
+
const folderRef = folderBindingRef(resolver, spec.folder, connRef, { attribute: 'folder', where, target });
|
|
1104
1104
|
if (folderRef)
|
|
1105
1105
|
context.push(io('folderKey', 'string', { value: `=bindings.${folderRef.id}` }));
|
|
1106
1106
|
context.push(io('objectName', 'string', { value: op.objectName ?? spec.action }), io('method', 'string', { value: transportHttpMethod(rc.httpMethod) }), io('path', 'string', { value: rc.endpoint }), io('metadata', 'json', { body: connectorMetadata(rc, op) }));
|
|
@@ -1148,7 +1148,7 @@ function externalTaskData(kind, spec, resolver, where) {
|
|
|
1148
1148
|
throw new Error(`${kind} task mode must be "sync" or "async".`);
|
|
1149
1149
|
const target = { key: spec.connector.key, action: spec.connector.action };
|
|
1150
1150
|
const connection = bindingRef(resolver, spec.connector.connection, 'Connection', 'ConnectionId', `${rc.connectorKey} connection`, { attribute: 'connection', where, target });
|
|
1151
|
-
const folder =
|
|
1151
|
+
const folder = folderBindingRef(resolver, spec.connector.folder, connection, { attribute: 'folder', where, target });
|
|
1152
1152
|
if (!connection || !folder)
|
|
1153
1153
|
throw new Error(`${kind} task requires non-empty connection and folder binding names.`);
|
|
1154
1154
|
const serviceType = kind === 'external-agent'
|
|
@@ -1236,6 +1236,50 @@ function bindingRef(resolver, name, resource, propertyAttribute, displayName, si
|
|
|
1236
1236
|
}
|
|
1237
1237
|
return { id, resourceKey };
|
|
1238
1238
|
}
|
|
1239
|
+
/**
|
|
1240
|
+
* A connector's folder is a property of its connection:
|
|
1241
|
+
* { resourceKey: <connection key>, default: <folder key>, propertyAttribute: 'folderKey' }.
|
|
1242
|
+
* One folder label on two connections gets one row each: `shared`, `shared_2`.
|
|
1243
|
+
* One connection with two different folders is refused: a connection lives in
|
|
1244
|
+
* one folder, and the syncs group rows by `resourceKey`, so one value would win.
|
|
1245
|
+
* Without a connection the folder binds as a plain binding.
|
|
1246
|
+
*/
|
|
1247
|
+
function folderBindingRef(resolver, name, connection, site) {
|
|
1248
|
+
if (!connection)
|
|
1249
|
+
return bindingRef(resolver, name, 'Connection', 'folderKey', 'FolderKey', site);
|
|
1250
|
+
if (!name)
|
|
1251
|
+
return undefined;
|
|
1252
|
+
const refused = bindingLabelRefusal(resolver.bindings, name, site.attribute, site.where, site.target);
|
|
1253
|
+
if (refused)
|
|
1254
|
+
throw refused;
|
|
1255
|
+
const entry = resolver.bindings?.entry(name);
|
|
1256
|
+
const baseId = entry?.id ?? name;
|
|
1257
|
+
const folderKey = entry?.default ?? entry?.resourceKey ?? name;
|
|
1258
|
+
const matches = (row) => row?.resourceKey === connection.resourceKey && row?.default === folderKey
|
|
1259
|
+
&& row?.propertyAttribute === 'folderKey';
|
|
1260
|
+
for (const row of resolver.bindingSink.values()) {
|
|
1261
|
+
if (row.resourceKey === connection.resourceKey && row.propertyAttribute === 'folderKey'
|
|
1262
|
+
&& row.default !== folderKey)
|
|
1263
|
+
throw new Error(`${site.where}: connection "${connection.resourceKey}" is bound to two folders: `
|
|
1264
|
+
+ `"${String(row.name)}" (${String(row.default)}) and "${name}" (${folderKey}). `
|
|
1265
|
+
+ `A connection lives in one folder; use the same folder binding for every task on it.`);
|
|
1266
|
+
}
|
|
1267
|
+
let id = baseId;
|
|
1268
|
+
for (let n = 2; resolver.bindingSink.has(id) && !matches(resolver.bindingSink.get(id)); n++)
|
|
1269
|
+
id = `${baseId}_${n}`;
|
|
1270
|
+
if (!resolver.bindingSink.has(id)) {
|
|
1271
|
+
resolver.bindingSink.set(id, {
|
|
1272
|
+
id,
|
|
1273
|
+
name: entry?.name ?? 'FolderKey',
|
|
1274
|
+
type: 'string',
|
|
1275
|
+
resource: 'Connection',
|
|
1276
|
+
resourceKey: connection.resourceKey,
|
|
1277
|
+
default: folderKey,
|
|
1278
|
+
propertyAttribute: 'folderKey',
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1281
|
+
return { id };
|
|
1282
|
+
}
|
|
1239
1283
|
/** The connector `metadata` json blob: the FUNCTIONAL essentialConfiguration +
|
|
1240
1284
|
* activityTypeId. Designer cosmetics (packageId/activityColor/…) are omitted —
|
|
1241
1285
|
* the caseplan schema-validates without them (see design §C). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.32.
|
|
3
|
+
"version": "6.32.7",
|
|
4
4
|
"description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.uipath.com/maestro",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"@types/node": "^22.7.0",
|
|
94
94
|
"esbuild": "^0.28.1"
|
|
95
95
|
},
|
|
96
|
-
"gitref": "
|
|
96
|
+
"gitref": "25920074d219f5839f57dd1e8ef96af291415168"
|
|
97
97
|
}
|