@uipath/maestro-builder-sdk 6.68.0 → 6.68.1
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/core/library.js +58 -30
- package/package.json +2 -2
package/dist/core/library.js
CHANGED
|
@@ -337,11 +337,13 @@ export class Library {
|
|
|
337
337
|
// START form of none (448 `.event.` entries, 0 `.trigger.`; only the curated
|
|
338
338
|
// overlay adds a handful of `.trigger.` pairs). The platform ships both for
|
|
339
339
|
// one operation and the namespace is the only difference, so the start form
|
|
340
|
-
// is DERIVED from its wait sibling
|
|
341
|
-
//
|
|
342
|
-
|
|
340
|
+
// is DERIVED from its wait sibling — measured against the platform's own
|
|
341
|
+
// `registry get` answers for both forms (see `deriveTriggerForm`).
|
|
342
|
+
// `eventFallback` is the one place that says so; `identifyEvent` reads it too.
|
|
343
|
+
const fallback = eventFallback(kind);
|
|
344
|
+
if (!fallback)
|
|
343
345
|
throw error;
|
|
344
|
-
const siblingType = `uipath.connector.
|
|
346
|
+
const siblingType = `uipath.connector.${fallback.ns}.${key}.${event}`;
|
|
345
347
|
let sibling;
|
|
346
348
|
try {
|
|
347
349
|
sibling = this.resolveType(siblingType, version, objectName);
|
|
@@ -355,7 +357,7 @@ export class Library {
|
|
|
355
357
|
throw siblingError;
|
|
356
358
|
throw error;
|
|
357
359
|
}
|
|
358
|
-
rc =
|
|
360
|
+
rc = fallback.derive(sibling, nodeType);
|
|
359
361
|
}
|
|
360
362
|
return normalizeEventOperation(rc);
|
|
361
363
|
}
|
|
@@ -365,31 +367,40 @@ export class Library {
|
|
|
365
367
|
* {@link identifyAction} for connector activities.
|
|
366
368
|
*/
|
|
367
369
|
identifyEvent(kind, wire) {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
370
|
+
// The same sources, in the same order, that `resolveEvent` reads: a trigger
|
|
371
|
+
// the library carries only in its WAIT form is identified from that entry,
|
|
372
|
+
// passed through the same derivation compile used to write it (#1073).
|
|
373
|
+
const fallback = eventFallback(kind);
|
|
374
|
+
const sources = [{ ns: kind, derive: undefined }, ...(fallback ? [fallback] : [])];
|
|
375
|
+
for (const source of sources) {
|
|
376
|
+
const prefix = `uipath.connector.${source.ns}.${wire.connectorKey}.`;
|
|
377
|
+
for (const layer of this.layers) {
|
|
378
|
+
for (const indexed of layer.entries) {
|
|
379
|
+
if (indexed.connectorKey !== wire.connectorKey || !String(indexed.nodeType ?? '').startsWith(prefix))
|
|
380
|
+
continue;
|
|
381
|
+
if (wire.version && indexed.version !== wire.version)
|
|
382
|
+
continue;
|
|
383
|
+
const event = String(indexed.nodeType).slice(prefix.length);
|
|
384
|
+
const entryPath = libraryPath(layer.dir, indexed.path);
|
|
385
|
+
const read = { entry: readJson(this.read, entryPath), v1def: readV1def(this.read, entryPath) };
|
|
386
|
+
const asked = source.derive ? source.derive(read, `uipath.connector.${kind}.${wire.connectorKey}.${event}`) : read;
|
|
387
|
+
const operation = normalizeEventOperation(asked).entry.operation ?? {};
|
|
388
|
+
// A GENERIC event's entry names no object — the wire's object is the
|
|
389
|
+
// author's choice, so it identifies nothing here and comes back as `object`.
|
|
390
|
+
const generic = operation.activityType === 'GenericTrigger';
|
|
391
|
+
if (!generic && wire.objectName && operation.objectName !== wire.objectName)
|
|
392
|
+
continue;
|
|
393
|
+
if (wire.eventOperation && operation.eventOperation !== wire.eventOperation)
|
|
394
|
+
continue;
|
|
395
|
+
if (wire.eventMode && operation.eventMode !== wire.eventMode)
|
|
396
|
+
continue;
|
|
397
|
+
return {
|
|
398
|
+
key: wire.connectorKey,
|
|
399
|
+
event,
|
|
400
|
+
version: String(indexed.version),
|
|
401
|
+
...(generic && wire.objectName ? { object: wire.objectName } : {}),
|
|
402
|
+
};
|
|
403
|
+
}
|
|
393
404
|
}
|
|
394
405
|
}
|
|
395
406
|
throw new CompileRefusal('EVENT_UNKNOWN', `connector ${kind} event not found in library: ${wire.connectorKey} `
|
|
@@ -1146,6 +1157,23 @@ function normalizeEventOperation(rc) {
|
|
|
1146
1157
|
};
|
|
1147
1158
|
return { ...rc, entry: { ...rc.entry, operation: normalized } };
|
|
1148
1159
|
}
|
|
1160
|
+
/**
|
|
1161
|
+
* The fallback the library uses for a connector event of `kind` that its own
|
|
1162
|
+
* namespace cannot resolve, or `undefined` when there is none.
|
|
1163
|
+
*
|
|
1164
|
+
* A start (`trigger`) falls back to its wait form, DERIVED by `deriveTriggerForm`,
|
|
1165
|
+
* because the registry dump ships wait forms only. A wait (`event`) has no
|
|
1166
|
+
* fallback.
|
|
1167
|
+
*
|
|
1168
|
+
* `resolveEvent` (TypeScript to wire) and `identifyEvent` (wire back to
|
|
1169
|
+
* TypeScript) both read this, so the reverse lookup cannot miss an entry the
|
|
1170
|
+
* forward one resolved (#1073: decompile threw "connector trigger event not
|
|
1171
|
+
* found" for every trigger the library carried only as `.event.`).
|
|
1172
|
+
*/
|
|
1173
|
+
function eventFallback(kind) {
|
|
1174
|
+
return kind === 'trigger' ? TRIGGER_FALLBACK : undefined;
|
|
1175
|
+
}
|
|
1176
|
+
const TRIGGER_FALLBACK = { ns: 'event', derive: (rc, nodeType) => deriveTriggerForm(rc, nodeType) };
|
|
1149
1177
|
/**
|
|
1150
1178
|
* Derive a connector event's START form (`uipath.connector.trigger.<key>.<event>`)
|
|
1151
1179
|
* from its WAIT form (`uipath.connector.event.<key>.<event>`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.68.
|
|
3
|
+
"version": "6.68.1",
|
|
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",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"@types/node": "^22.7.0",
|
|
101
101
|
"esbuild": "^0.28.1"
|
|
102
102
|
},
|
|
103
|
-
"gitref": "
|
|
103
|
+
"gitref": "cc5d3156131d305c073258591e362deb7f4fbbde"
|
|
104
104
|
}
|