@uipath/maestro-builder-sdk 6.120.18 → 6.120.19
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 +30 -30
- package/dist/api-members.md +115 -115
- package/dist/bpmn/bpmn-expr-check.d.ts +4 -0
- package/dist/bpmn/bpmn-expr-check.js +109 -19
- package/dist/bpmn/bpmn-sdk.d.ts +27 -4
- package/dist/bpmn/bpmn-sdk.js +20 -1
- package/dist/bpmn/declared-vars.d.ts +30 -1
- package/dist/bpmn/declared-vars.js +43 -0
- package/dist/bpmn/decompile.js +11 -1
- package/dist/bpmn/expression-value.d.ts +16 -0
- package/dist/bpmn/expression-value.js +18 -0
- package/dist/bpmn/serialize.d.ts +0 -26
- package/dist/bpmn/serialize.js +3 -42
- package/dist/bpmn-api.md +2 -2
- package/dist/core/actions.d.ts +2 -2
- package/dist/core/list-envelope.d.ts +7 -0
- package/dist/core/refusals.d.ts +1 -0
- package/dist/core/refusals.js +1 -0
- package/dist/registry/curated-overlay.d.ts +18 -3
- package/dist/registry/curated-overlay.js +98 -5
- package/dist/registry/prepare/actions.d.ts +1 -1
- package/dist/registry/prepare/actions.js +1 -1
- package/dist/registry/prepare/messages.js +1 -1
- package/lib/library-json.samples/list-envelopes.json +29 -1
- package/package.json +2 -2
|
@@ -5,6 +5,8 @@ export declare function bundledOverlayPath(): string;
|
|
|
5
5
|
export declare function curatedOverlayIdentity(overlayPath?: string): Promise<string>;
|
|
6
6
|
/** The ledger of deliberate patches; read here, never copied into a library. */
|
|
7
7
|
export declare const CORRECTIONS_FILE = "overlay-corrections.json";
|
|
8
|
+
/** SDK-owned side-tables the published library does not carry; always copied. */
|
|
9
|
+
export declare const SIDE_TABLES: ReadonlySet<string>;
|
|
8
10
|
/** One row of {@link CORRECTIONS_FILE}. */
|
|
9
11
|
export interface OverlayCorrection {
|
|
10
12
|
path: string;
|
|
@@ -94,12 +96,25 @@ export interface CuratedOverlayCheck {
|
|
|
94
96
|
* was renamed or re-versioned. `registry pull` only warns about these too.
|
|
95
97
|
*/
|
|
96
98
|
staleCorrections: string[];
|
|
99
|
+
/**
|
|
100
|
+
* Side-table rows keyed on something the library no longer carries, so the
|
|
101
|
+
* row has stopped applying: a `list-envelopes.json` row whose `nodeType` the
|
|
102
|
+
* library does not index (or whose `objectName` is not among the per-object
|
|
103
|
+
* rows of that node type), or an `invariant-collections.json` row whose
|
|
104
|
+
* collection no input field references. A refresh that renames an operation
|
|
105
|
+
* silently drops a measured row otherwise (#853: `list-all-records` became
|
|
106
|
+
* `list-records`). A row marked `keyRetired` is kept for older libraries
|
|
107
|
+
* and not checked.
|
|
108
|
+
*/
|
|
109
|
+
staleSideTableRows: string[];
|
|
97
110
|
}
|
|
98
111
|
/**
|
|
99
|
-
* Check `libraryPath` against the curated overlay.
|
|
100
|
-
* {@link applyCuratedOverlay} has run on it, unless a correction
|
|
112
|
+
* Check `libraryPath` against the curated overlay. All three lists are empty
|
|
113
|
+
* once {@link applyCuratedOverlay} has run on it, unless a correction or a
|
|
114
|
+
* side-table row went stale.
|
|
101
115
|
* Every overlay identity that is not a correction must be indexed at a file
|
|
102
|
-
* that exists,
|
|
116
|
+
* that exists, each side-table must equal the bundled copy, and each
|
|
117
|
+
* side-table row must still key on something the library carries.
|
|
103
118
|
*
|
|
104
119
|
* The connector library pipeline runs this on the archive it publishes,
|
|
105
120
|
* because readers that load that archive directly apply no overlay.
|
|
@@ -62,7 +62,7 @@ export const CORRECTIONS_FILE = "overlay-corrections.json";
|
|
|
62
62
|
*/
|
|
63
63
|
const RECORD_FILE = ".curated-overlay.json";
|
|
64
64
|
/** SDK-owned side-tables the published library does not carry; always copied. */
|
|
65
|
-
const SIDE_TABLES = new Set(["list-envelopes.json", "invariant-collections.json"]);
|
|
65
|
+
export const SIDE_TABLES = new Set(["list-envelopes.json", "invariant-collections.json"]);
|
|
66
66
|
/** The sidecar that travels with an entry file, and has no index row of its own. */
|
|
67
67
|
function sidecarOf(rel) {
|
|
68
68
|
return `${rel.slice(0, -".json".length)}.v1def.json`;
|
|
@@ -365,11 +365,103 @@ reporter = consoleReporter) {
|
|
|
365
365
|
`, kept ${result.kept.length + result.skipped.length} published definition(s) unchanged.`);
|
|
366
366
|
return result;
|
|
367
367
|
}
|
|
368
|
+
/** The `nodeType` → `objectName`s index of a library (`''` for an entry with none). */
|
|
369
|
+
function objectsByNodeType(entries) {
|
|
370
|
+
const out = new Map();
|
|
371
|
+
for (const entry of entries) {
|
|
372
|
+
if (typeof entry.nodeType !== "string")
|
|
373
|
+
continue;
|
|
374
|
+
const objects = out.get(entry.nodeType) ?? new Set();
|
|
375
|
+
objects.add(typeof entry.objectName === "string" ? entry.objectName : "");
|
|
376
|
+
out.set(entry.nodeType, objects);
|
|
377
|
+
}
|
|
378
|
+
return out;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Every collection an INPUT field of the library references: its
|
|
382
|
+
* `reference.objectName`, and the last segment of its `reference.path` (90
|
|
383
|
+
* registry references carry no `objectName`). Only the places a reader takes
|
|
384
|
+
* input fields from are read — the entry's `inputSchema.fields` and
|
|
385
|
+
* `operation.parameters`, and the sidecar's `inputDefinition.fields` — so a
|
|
386
|
+
* collection only an output names does not keep an input row alive.
|
|
387
|
+
*/
|
|
388
|
+
async function referencedCollections(libraryPath, entries) {
|
|
389
|
+
const out = new Set();
|
|
390
|
+
const add = (fields) => {
|
|
391
|
+
if (!Array.isArray(fields))
|
|
392
|
+
return;
|
|
393
|
+
for (const field of fields) {
|
|
394
|
+
const reference = isDict(field) ? field.reference : undefined;
|
|
395
|
+
if (!isDict(reference))
|
|
396
|
+
continue;
|
|
397
|
+
if (typeof reference.objectName === "string" && reference.objectName)
|
|
398
|
+
out.add(reference.objectName);
|
|
399
|
+
if (typeof reference.path === "string") {
|
|
400
|
+
const last = reference.path.split("/").filter(Boolean).pop();
|
|
401
|
+
if (last)
|
|
402
|
+
out.add(last);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
for (const path of new Set(entries.map((entry) => entry.path).filter((path) => typeof path === "string"))) {
|
|
407
|
+
const file = join(libraryPath, path);
|
|
408
|
+
if (await exists(file)) {
|
|
409
|
+
const entry = await readJson(file);
|
|
410
|
+
if (isDict(entry)) {
|
|
411
|
+
add(entry.inputSchema?.fields);
|
|
412
|
+
add(entry.operation?.parameters);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
const sidecar = join(libraryPath, sidecarOf(path));
|
|
416
|
+
if (await exists(sidecar))
|
|
417
|
+
add(sidecarBody(await readJson(sidecar))?.inputDefinition?.fields);
|
|
418
|
+
}
|
|
419
|
+
return out;
|
|
420
|
+
}
|
|
421
|
+
async function readSideTableRows(overlayPath, table, key) {
|
|
422
|
+
const parsed = await readJson(join(overlayPath, table));
|
|
423
|
+
const rows = isDict(parsed) ? parsed[key] : undefined;
|
|
424
|
+
return Array.isArray(rows) ? rows.filter(isDict) : [];
|
|
425
|
+
}
|
|
426
|
+
/** {@link CuratedOverlayCheck.staleSideTableRows} for `libraryPath`. */
|
|
427
|
+
async function staleSideTableRowsOf(libraryPath, overlayPath, entries) {
|
|
428
|
+
const stale = [];
|
|
429
|
+
const objects = objectsByNodeType(entries);
|
|
430
|
+
for (const row of await readSideTableRows(overlayPath, "list-envelopes.json", "operations")) {
|
|
431
|
+
if (row.keyRetired !== undefined)
|
|
432
|
+
continue;
|
|
433
|
+
const nodeType = String(row.nodeType);
|
|
434
|
+
const objectName = typeof row.objectName === "string" ? row.objectName : undefined;
|
|
435
|
+
const where = `list-envelopes.json row ${nodeType}${objectName ? ` (${objectName})` : ""}`;
|
|
436
|
+
const served = objects.get(nodeType);
|
|
437
|
+
if (served === undefined) {
|
|
438
|
+
stale.push(`${where}: the library has no definition of that node type`);
|
|
439
|
+
continue;
|
|
440
|
+
}
|
|
441
|
+
// An entry with no objectName is a discovered object (connection-scoped
|
|
442
|
+
// Generic): any object may be addressed. Otherwise the object must be one of its rows.
|
|
443
|
+
if (objectName !== undefined && !served.has("") && !served.has(objectName)) {
|
|
444
|
+
stale.push(`${where}: the library serves that node type only for ${sortedStrings([...served]).join(", ")}`);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
const collections = await readSideTableRows(overlayPath, "invariant-collections.json", "collections");
|
|
448
|
+
if (collections.length > 0) {
|
|
449
|
+
const referenced = await referencedCollections(libraryPath, entries);
|
|
450
|
+
for (const row of collections) {
|
|
451
|
+
if (row.keyRetired !== undefined || referenced.has(String(row.objectName)))
|
|
452
|
+
continue;
|
|
453
|
+
stale.push(`invariant-collections.json row ${String(row.objectName)}: no input field of the library references that collection`);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return stale;
|
|
457
|
+
}
|
|
368
458
|
/**
|
|
369
|
-
* Check `libraryPath` against the curated overlay.
|
|
370
|
-
* {@link applyCuratedOverlay} has run on it, unless a correction
|
|
459
|
+
* Check `libraryPath` against the curated overlay. All three lists are empty
|
|
460
|
+
* once {@link applyCuratedOverlay} has run on it, unless a correction or a
|
|
461
|
+
* side-table row went stale.
|
|
371
462
|
* Every overlay identity that is not a correction must be indexed at a file
|
|
372
|
-
* that exists,
|
|
463
|
+
* that exists, each side-table must equal the bundled copy, and each
|
|
464
|
+
* side-table row must still key on something the library carries.
|
|
373
465
|
*
|
|
374
466
|
* The connector library pipeline runs this on the archive it publishes,
|
|
375
467
|
* because readers that load that archive directly apply no overlay.
|
|
@@ -442,7 +534,8 @@ export async function checkCuratedOverlay(libraryPath, overlayPath = bundledOver
|
|
|
442
534
|
missing.push(`side-table ${table}: differs from the SDK's copy`);
|
|
443
535
|
}
|
|
444
536
|
}
|
|
445
|
-
|
|
537
|
+
const staleSideTableRows = await staleSideTableRowsOf(libraryPath, overlayPath, library.entries ?? []);
|
|
538
|
+
return { missing, staleCorrections, staleSideTableRows };
|
|
446
539
|
}
|
|
447
540
|
/**
|
|
448
541
|
* The curated overlay's two connection-free contributions to a library that
|
|
@@ -13,7 +13,7 @@ export declare function registryActionIds(payload: unknown, connectorKey: string
|
|
|
13
13
|
* Candidates ranked by shared hyphen tokens, best first.
|
|
14
14
|
*
|
|
15
15
|
* Token overlap rather than edit distance because the two namespaces differ by
|
|
16
|
-
* whole words, not typos:
|
|
16
|
+
* whole words, not typos: an older library's `list-all-records` against the
|
|
17
17
|
* registry's `list-records`. Python sorted `(overlap, -len, name)` descending,
|
|
18
18
|
* so ties on overlap prefer the SHORTER id, and ties on both fall back to the
|
|
19
19
|
* name in reverse code-point order.
|
|
@@ -56,7 +56,7 @@ export function registryActionIds(payload, connectorKey) {
|
|
|
56
56
|
* Candidates ranked by shared hyphen tokens, best first.
|
|
57
57
|
*
|
|
58
58
|
* Token overlap rather than edit distance because the two namespaces differ by
|
|
59
|
-
* whole words, not typos:
|
|
59
|
+
* whole words, not typos: an older library's `list-all-records` against the
|
|
60
60
|
* registry's `list-records`. Python sorted `(overlap, -len, name)` descending,
|
|
61
61
|
* so ties on overlap prefer the SHORTER id, and ties on both fall back to the
|
|
62
62
|
* name in reverse code-point order.
|
|
@@ -238,7 +238,7 @@ export function unresolvedOperationMessage(input) {
|
|
|
238
238
|
// where it would point an event request at action ids again.
|
|
239
239
|
const wanted = new Set(name.split("-")).size;
|
|
240
240
|
if (close.length > 0 && sharedTokens(name, close[0]) * 2 > wanted) {
|
|
241
|
-
lines.push("The baked library's action id is not always the registry's key — a
|
|
241
|
+
lines.push("The baked library's action id is not always the registry's key — a library built", "before 2026-11 calls a Generic op `list-all-records`, while the registry serves", "`list-records`. For an action, re-run with a registry action id.");
|
|
242
242
|
}
|
|
243
243
|
lines.push("", `All actions the registry serves for ${key}:`, ...catalog.actions.map((a) => ` ${a}`));
|
|
244
244
|
}
|
|
@@ -44,7 +44,15 @@
|
|
|
44
44
|
"",
|
|
45
45
|
"This is NOT a licence to default the whole verb to bare. Eight of 2,149 is",
|
|
46
46
|
"0.4%, and campaign lesson 25 is this issue's own history: card G1 measured",
|
|
47
|
-
"three operations, generalised to the verb, and the corpus refused it."
|
|
47
|
+
"three operations, generalised to the verb, and the corpus refused it.",
|
|
48
|
+
"",
|
|
49
|
+
"A ROW IS KEYED ON THE LIBRARY'S nodeType, AND A REFRESH CAN RENAME IT. The",
|
|
50
|
+
"#853 rebuild turned the generic `list-all-records` into `list-records`, and",
|
|
51
|
+
"the two generic rows silently stopped applying. `curated-overlay.mjs",
|
|
52
|
+
"--check` (checkCuratedOverlay) now fails on a row whose nodeType, or",
|
|
53
|
+
"objectName, the library no longer carries. When an operation is renamed,",
|
|
54
|
+
"re-key the row and keep the old one with a `keyRetired` note for libraries",
|
|
55
|
+
"built before the rename; the check skips a retired row."
|
|
48
56
|
],
|
|
49
57
|
"operations": [
|
|
50
58
|
{
|
|
@@ -92,8 +100,18 @@
|
|
|
92
100
|
"source": "card G13 probe-box — `flow debug` jobKey a7015865-44c8-4a1a-82f5-6af3ae0d1b7e; globals `boxItems.output` = array(2) of {name,sequence_id,etag,id,type}. The prediction test: Box's own API answers `{\"entries\":[…],\"total_count\":…}` and none of that reaches the flow.",
|
|
93
101
|
"cliShape": "{items,Pagination}"
|
|
94
102
|
},
|
|
103
|
+
{
|
|
104
|
+
"nodeType": "uipath.connector.uipath-coupa-coupa.list-records",
|
|
105
|
+
"objectName": "accounts",
|
|
106
|
+
"envelope": null,
|
|
107
|
+
"tier": "A1",
|
|
108
|
+
"measuredAt": "2026-08-02",
|
|
109
|
+
"source": "card G13 probe-coupa — `flow debug` jobKey af7bfdcc-2fb2-4606-9665-45500ae49148; globals `coupaAccounts.output` = array(2). The GENERIC `list-all-records` family, on a connector no corpus artifact has ever touched. Measured under the operation's pre-#853 id `list-all-records`.",
|
|
110
|
+
"cliShape": "{items,Pagination}"
|
|
111
|
+
},
|
|
95
112
|
{
|
|
96
113
|
"nodeType": "uipath.connector.uipath-coupa-coupa.list-all-records",
|
|
114
|
+
"keyRetired": "The registry serves this operation as `list-records` since the #853 library rebuild (2026-11-15); the row above carries the measurement. Kept for libraries built before it.",
|
|
97
115
|
"objectName": "accounts",
|
|
98
116
|
"envelope": null,
|
|
99
117
|
"tier": "A1",
|
|
@@ -101,8 +119,18 @@
|
|
|
101
119
|
"source": "card G13 probe-coupa — `flow debug` jobKey af7bfdcc-2fb2-4606-9665-45500ae49148; globals `coupaAccounts.output` = array(2). The GENERIC `list-all-records` family, on a connector no corpus artifact has ever touched.",
|
|
102
120
|
"cliShape": "{items,Pagination}"
|
|
103
121
|
},
|
|
122
|
+
{
|
|
123
|
+
"nodeType": "uipath.connector.uipath-servicenow-servicenow.list-records",
|
|
124
|
+
"objectName": "acr_user",
|
|
125
|
+
"envelope": null,
|
|
126
|
+
"tier": "A3",
|
|
127
|
+
"measuredAt": "2026-06-23",
|
|
128
|
+
"source": "seven executing 1.0 runs of `skill-flow-generic-dynamic-node` (2026-06-16 … 06-23). `check_generic_dynamic_node.py` runs `flow debug`, then asserts a LIST-valued entry in `variables.globals` and names it — `\"OK: connector completed and surfaced an array output 'listAcrUserRecords1.output'\"`. A wrapper would have failed that assertion. Measured under the operation's pre-#853 id `list-all-records`.",
|
|
129
|
+
"cliShape": "{items,Pagination}"
|
|
130
|
+
},
|
|
104
131
|
{
|
|
105
132
|
"nodeType": "uipath.connector.uipath-servicenow-servicenow.list-all-records",
|
|
133
|
+
"keyRetired": "The registry serves this operation as `list-records` since the #853 library rebuild (2026-11-15); the row above carries the measurement. Kept for libraries built before it.",
|
|
106
134
|
"objectName": "acr_user",
|
|
107
135
|
"envelope": null,
|
|
108
136
|
"tier": "A3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.120.
|
|
3
|
+
"version": "6.120.19",
|
|
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",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"@types/node": "^22.7.0",
|
|
125
125
|
"esbuild": "^0.28.1"
|
|
126
126
|
},
|
|
127
|
-
"gitref": "
|
|
127
|
+
"gitref": "b422c75363bbd5372d32499c77e6937ae2cc7f85"
|
|
128
128
|
}
|