@uipath/maestro-sdk 1.202.1 → 1.203.0-preview.180
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/THIRD-PARTY-NOTICES.md +44 -15
- package/dist/bpmn-layout/index.js +104519 -0
- package/dist/bpmn-packaging/index.js +5801 -176
- package/dist/bpmn-validation/project-validator.js +6602 -197
- package/dist/debug-http-client.js +274 -25
- package/dist/debug-service.js +287 -28
- package/dist/index.js +13897 -5637
- package/dist/json-input.js +274 -25
- package/dist/manifest/bpmn-spec.js +94 -94
- package/dist/registry/agent-metadata-reader.js +64 -0
- package/dist/registry/command.js +3415 -1031
- package/dist/registry/snapshot.js +274 -25
- package/dist/shared-commands/index.js +308 -38
- package/dist/shared-utils.js +274 -25
- package/dist/src/bpmn-layout/apply.d.ts +9 -0
- package/dist/src/bpmn-layout/index.d.ts +12 -0
- package/dist/src/bpmn-layout/layout.d.ts +12 -0
- package/dist/src/bpmn-layout/parse.d.ts +18 -0
- package/dist/src/bpmn-layout/types.d.ts +53 -0
- package/dist/src/bpmn-validation/project-validator.d.ts +10 -0
- package/dist/src/registry/agent-metadata-reader.d.ts +26 -0
- package/dist/src/registry/integration-service-fetcher.d.ts +2 -2
- package/dist/src/registry/integration-service-metadata.types.d.ts +1 -4
- package/dist/src/registry/node-storage.d.ts +1 -1
- package/dist/src/registry/node-sync-service.d.ts +1 -1
- package/dist/src/registry/solution-discovery.d.ts +6 -4
- package/dist/with-pims-call.js +295 -35
- package/package.json +13 -2
package/dist/shared-utils.js
CHANGED
|
@@ -1186,8 +1186,11 @@ function collapseJsonBodies(text) {
|
|
|
1186
1186
|
return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
|
|
1187
1187
|
}
|
|
1188
1188
|
function peelTrailingPunctuation(match) {
|
|
1189
|
-
|
|
1190
|
-
|
|
1189
|
+
let end = match.length;
|
|
1190
|
+
while (end > 0 && TRAILING_PROSE_PUNCT.includes(match[end - 1])) {
|
|
1191
|
+
end -= 1;
|
|
1192
|
+
}
|
|
1193
|
+
return [match.slice(0, end), match.slice(end)];
|
|
1191
1194
|
}
|
|
1192
1195
|
function redactUrl(raw) {
|
|
1193
1196
|
try {
|
|
@@ -1305,7 +1308,7 @@ function redactProperties(properties) {
|
|
|
1305
1308
|
}
|
|
1306
1309
|
return out;
|
|
1307
1310
|
}
|
|
1308
|
-
var REDACTED = "[REDACTED]", MAX_VALUE_LENGTH = 280, MAX_STACK_LENGTH = 4096, MAX_SCAN_LENGTH, SENSITIVE_NAME_TOKENS, SENSITIVE_KEY_PREFIXES, UUID_PATTERN, EMAIL_PATTERN, JWT_PATTERN, LONG_TOKEN_PATTERN, PADDED_BASE64_PATTERN, BASE64_WITH_PLUS_PATTERN, USER_HOME_PATTERN, UNC_PATH_PATTERN, HOST_PORT_PATTERN, SOURCE_FILE_EXTENSIONS, URL_PATTERN, QUOTED_LITERAL_MAX_SPAN = 200, QUOTED_LITERAL_PATTERN, JSON_BODY_PATTERN, COLLAPSED_BODY = "{…}", COLLAPSED_BODY_MARKER = "\x01body\x01", MAX_BODY_NESTING = 8, TRAILING_PROSE_PUNCT
|
|
1311
|
+
var REDACTED = "[REDACTED]", MAX_VALUE_LENGTH = 280, MAX_STACK_LENGTH = 4096, MAX_SCAN_LENGTH, SENSITIVE_NAME_TOKENS, SENSITIVE_KEY_PREFIXES, UUID_PATTERN, EMAIL_PATTERN, JWT_PATTERN, LONG_TOKEN_PATTERN, PADDED_BASE64_PATTERN, BASE64_WITH_PLUS_PATTERN, USER_HOME_PATTERN, UNC_PATH_PATTERN, HOST_PORT_PATTERN, SOURCE_FILE_EXTENSIONS, URL_PATTERN, QUOTED_LITERAL_MAX_SPAN = 200, QUOTED_LITERAL_PATTERN, JSON_BODY_PATTERN, COLLAPSED_BODY = "{…}", COLLAPSED_BODY_MARKER = "\x01body\x01", MAX_BODY_NESTING = 8, TRAILING_PROSE_PUNCT = `.,;:!?)]}>'"`, HTTP_DEPENDENCY_NAME, MESSAGE_NAMES;
|
|
1309
1312
|
var init_pii_redactor = __esm(() => {
|
|
1310
1313
|
init_pseudonymize();
|
|
1311
1314
|
init_supplied_values();
|
|
@@ -1350,7 +1353,7 @@ var init_pii_redactor = __esm(() => {
|
|
|
1350
1353
|
EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
1351
1354
|
JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
1352
1355
|
LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
1353
|
-
PADDED_BASE64_PATTERN = /[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
1356
|
+
PADDED_BASE64_PATTERN = /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
1354
1357
|
BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
|
|
1355
1358
|
USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
|
|
1356
1359
|
UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
|
|
@@ -1396,8 +1399,7 @@ var init_pii_redactor = __esm(() => {
|
|
|
1396
1399
|
`(?<![A-Za-z0-9])"(?:[^\\
|
|
1397
1400
|
]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
|
|
1398
1401
|
].join("|"), "g");
|
|
1399
|
-
JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
|
|
1400
|
-
TRAILING_PROSE_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
1402
|
+
JSON_BODY_PATTERN = /[{[][^{}[\]:,]*[:,][^{}[\]]*[\]}]/g;
|
|
1401
1403
|
HTTP_DEPENDENCY_NAME = /^([A-Z]+) (\/.*)$/s;
|
|
1402
1404
|
MESSAGE_NAMES = new Set([
|
|
1403
1405
|
"message",
|
|
@@ -1555,6 +1557,22 @@ function parseHttpStatusFromMessage(message) {
|
|
|
1555
1557
|
const status = Number(match[1]);
|
|
1556
1558
|
return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
1557
1559
|
}
|
|
1560
|
+
function findHttpStatusInGraph(error) {
|
|
1561
|
+
for (const node of walkErrorGraph(error)) {
|
|
1562
|
+
const response = node.response;
|
|
1563
|
+
const explicit = typeof node.status === "number" ? node.status : response?.status;
|
|
1564
|
+
if (typeof explicit === "number" && explicit >= 400 && explicit <= 599) {
|
|
1565
|
+
return explicit;
|
|
1566
|
+
}
|
|
1567
|
+
if (typeof node.message === "string") {
|
|
1568
|
+
const parsed = parseHttpStatusFromMessage(node.message);
|
|
1569
|
+
if (parsed !== undefined && parsed >= 400) {
|
|
1570
|
+
return parsed;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
return;
|
|
1575
|
+
}
|
|
1558
1576
|
function isHtmlDocument(body) {
|
|
1559
1577
|
return /^\s*(<!doctype html|<html\b)/i.test(body);
|
|
1560
1578
|
}
|
|
@@ -1668,7 +1686,8 @@ async function extractErrorDetails(error, options) {
|
|
|
1668
1686
|
}
|
|
1669
1687
|
let message;
|
|
1670
1688
|
let result = "Failure";
|
|
1671
|
-
const
|
|
1689
|
+
const classificationStatus = status ?? findHttpStatusInGraph(error);
|
|
1690
|
+
const classification = classifyError(classificationStatus, error);
|
|
1672
1691
|
let retry = classification.retry;
|
|
1673
1692
|
if (status === 401) {
|
|
1674
1693
|
message = DEFAULT_401;
|
|
@@ -1744,8 +1763,8 @@ async function extractErrorDetails(error, options) {
|
|
|
1744
1763
|
details = describeThrownValue(error);
|
|
1745
1764
|
}
|
|
1746
1765
|
const context = {};
|
|
1747
|
-
if (
|
|
1748
|
-
context.httpStatus =
|
|
1766
|
+
if (classificationStatus) {
|
|
1767
|
+
context.httpStatus = classificationStatus;
|
|
1749
1768
|
}
|
|
1750
1769
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
1751
1770
|
context.errorCode = parsedBody.errorCode;
|
|
@@ -6715,6 +6734,9 @@ var init_output_format_context = __esm(() => {
|
|
|
6715
6734
|
filterSlot = singleton("OutputFilter");
|
|
6716
6735
|
});
|
|
6717
6736
|
|
|
6737
|
+
// ../common/src/output-formats.ts
|
|
6738
|
+
var init_output_formats = () => {};
|
|
6739
|
+
|
|
6718
6740
|
// ../common/src/telemetry/command-terminal.ts
|
|
6719
6741
|
function isRecord(value) {
|
|
6720
6742
|
return value !== null && typeof value === "object";
|
|
@@ -6954,7 +6976,8 @@ function readRegistryValue(keyPath, valueName) {
|
|
|
6954
6976
|
}
|
|
6955
6977
|
const [error, output] = catchError(() => execFileSync2("reg", ["query", keyPath, "/v", valueName], {
|
|
6956
6978
|
encoding: "utf-8",
|
|
6957
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
6979
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
6980
|
+
windowsHide: true
|
|
6958
6981
|
}));
|
|
6959
6982
|
if (error) {
|
|
6960
6983
|
return "";
|
|
@@ -7563,6 +7586,7 @@ function recordCommandDuration(durationMs) {
|
|
|
7563
7586
|
}
|
|
7564
7587
|
var TIMINGS_ENV_VAR = "UIP_TIMINGS", storageSlot, stateSlot, rootStartedSlot, longLivedHostSlot, storage;
|
|
7565
7588
|
var init_timings = __esm(() => {
|
|
7589
|
+
init_src();
|
|
7566
7590
|
init_catch_error();
|
|
7567
7591
|
init_logger();
|
|
7568
7592
|
init_singleton();
|
|
@@ -7722,28 +7746,32 @@ function isPlainRecord(value) {
|
|
|
7722
7746
|
const prototype = Object.getPrototypeOf(value);
|
|
7723
7747
|
return prototype === Object.prototype || prototype === null;
|
|
7724
7748
|
}
|
|
7725
|
-
function
|
|
7749
|
+
function splitPagedEnvelope(value) {
|
|
7726
7750
|
if (Array.isArray(value) || !isPlainRecord(value))
|
|
7727
7751
|
return null;
|
|
7728
|
-
const entries = Object.
|
|
7752
|
+
const entries = Object.entries(value);
|
|
7729
7753
|
if (entries.length === 0)
|
|
7730
7754
|
return null;
|
|
7731
|
-
let
|
|
7732
|
-
|
|
7733
|
-
for (const entry of entries) {
|
|
7755
|
+
let found = null;
|
|
7756
|
+
const meta = Object.create(null);
|
|
7757
|
+
for (const [key, entry] of entries) {
|
|
7734
7758
|
if (Array.isArray(entry)) {
|
|
7735
|
-
if (
|
|
7759
|
+
if (found !== null)
|
|
7736
7760
|
return null;
|
|
7737
|
-
|
|
7761
|
+
found = { key, rows: entry };
|
|
7738
7762
|
} else if (entry !== null && typeof entry === "object") {
|
|
7739
7763
|
return null;
|
|
7740
7764
|
} else {
|
|
7741
|
-
|
|
7765
|
+
meta[key] = entry;
|
|
7742
7766
|
}
|
|
7743
7767
|
}
|
|
7744
|
-
if (
|
|
7768
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
7745
7769
|
return null;
|
|
7746
|
-
return
|
|
7770
|
+
return { ...found, meta };
|
|
7771
|
+
}
|
|
7772
|
+
function extractPagedRows(value) {
|
|
7773
|
+
const paged = splitPagedEnvelope(value);
|
|
7774
|
+
return paged === null ? null : paged.rows;
|
|
7747
7775
|
}
|
|
7748
7776
|
function toLowerCamelCaseKey(key) {
|
|
7749
7777
|
if (!key)
|
|
@@ -7847,6 +7875,9 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
7847
7875
|
}
|
|
7848
7876
|
break;
|
|
7849
7877
|
}
|
|
7878
|
+
case "markdown":
|
|
7879
|
+
logFn(renderMarkdown(data));
|
|
7880
|
+
break;
|
|
7850
7881
|
default: {
|
|
7851
7882
|
const hasData = "Data" in data && data.Data != null;
|
|
7852
7883
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
@@ -7871,6 +7902,9 @@ function logOutput(data, format = "json", tableRowStyle) {
|
|
|
7871
7902
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
7872
7903
|
`), needsAsciiSafeJson(sink), styleFn);
|
|
7873
7904
|
}
|
|
7905
|
+
function isPlumbingKey(key) {
|
|
7906
|
+
return PLUMBING_KEYS.has(key.toLowerCase());
|
|
7907
|
+
}
|
|
7874
7908
|
function cellToString(val) {
|
|
7875
7909
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
7876
7910
|
}
|
|
@@ -7886,7 +7920,7 @@ function wrapText(text, width) {
|
|
|
7886
7920
|
function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
7887
7921
|
if (data.length === 0)
|
|
7888
7922
|
return;
|
|
7889
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
7923
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
7890
7924
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
|
|
7891
7925
|
const header = keys.map((key, i) => key.padEnd(maxWidths[i])).join(" | ");
|
|
7892
7926
|
logFn(header);
|
|
@@ -7907,7 +7941,7 @@ function isNonEmptyPlainObject(value) {
|
|
|
7907
7941
|
return isPlainRecord(value) && Object.keys(value).length > 0;
|
|
7908
7942
|
}
|
|
7909
7943
|
function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
7910
|
-
const keys = Object.keys(data).filter((key) => !
|
|
7944
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey(key));
|
|
7911
7945
|
if (keys.length === 0)
|
|
7912
7946
|
return;
|
|
7913
7947
|
const isBlockValue = (value) => isPlainObjectArray(value) || isNonEmptyPlainObject(value);
|
|
@@ -7938,7 +7972,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
|
7938
7972
|
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
7939
7973
|
if (data.length === 0)
|
|
7940
7974
|
return;
|
|
7941
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
7975
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
7942
7976
|
if (keys.length === 0)
|
|
7943
7977
|
return;
|
|
7944
7978
|
if (!process.stdout.isTTY) {
|
|
@@ -8012,6 +8046,217 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
8012
8046
|
logFn(`Log: ${externalLogValue}`);
|
|
8013
8047
|
}
|
|
8014
8048
|
}
|
|
8049
|
+
function markdownHeading(depth) {
|
|
8050
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
8051
|
+
}
|
|
8052
|
+
function fencedBlock(text) {
|
|
8053
|
+
const first = text.trimStart()[0];
|
|
8054
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
8055
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN), (match) => match[0].length));
|
|
8056
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
8057
|
+
return `${fence}${language}
|
|
8058
|
+
${text}
|
|
8059
|
+
${fence}`;
|
|
8060
|
+
}
|
|
8061
|
+
function collapseNewlineRuns(text) {
|
|
8062
|
+
return text.split(/(\s+)/).map((part, index) => index % 2 === 1 && part.includes(`
|
|
8063
|
+
`) ? " " : part).join("");
|
|
8064
|
+
}
|
|
8065
|
+
function markdownCell(value) {
|
|
8066
|
+
const text = value instanceof Date ? value.toISOString() : cellToString(value);
|
|
8067
|
+
return collapseNewlineRuns(text).replace(/\|/g, "\\|");
|
|
8068
|
+
}
|
|
8069
|
+
function markdownLabel(key) {
|
|
8070
|
+
return collapseNewlineRuns(key).replace(/[\\`*|]/g, "\\$&");
|
|
8071
|
+
}
|
|
8072
|
+
function withoutPlumbing(record) {
|
|
8073
|
+
const kept = Object.create(null);
|
|
8074
|
+
for (const [key, value] of Object.entries(record)) {
|
|
8075
|
+
if (!isPlumbingKey(key))
|
|
8076
|
+
kept[key] = value;
|
|
8077
|
+
}
|
|
8078
|
+
return kept;
|
|
8079
|
+
}
|
|
8080
|
+
function rowsWithoutPlumbing(rows) {
|
|
8081
|
+
return rows.map((row) => isPlainRecord(row) ? withoutPlumbing(row) : row);
|
|
8082
|
+
}
|
|
8083
|
+
function markdownTable(rows) {
|
|
8084
|
+
const columns = [];
|
|
8085
|
+
const seen = new Set;
|
|
8086
|
+
for (const row of rows) {
|
|
8087
|
+
for (const key of Object.keys(row)) {
|
|
8088
|
+
if (!seen.has(key)) {
|
|
8089
|
+
seen.add(key);
|
|
8090
|
+
columns.push(key);
|
|
8091
|
+
}
|
|
8092
|
+
}
|
|
8093
|
+
}
|
|
8094
|
+
if (columns.length === 0)
|
|
8095
|
+
return null;
|
|
8096
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell(row[key])));
|
|
8097
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL))) {
|
|
8098
|
+
return null;
|
|
8099
|
+
}
|
|
8100
|
+
return [
|
|
8101
|
+
`| ${columns.map(markdownLabel).join(" | ")} |`,
|
|
8102
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
8103
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
8104
|
+
].join(`
|
|
8105
|
+
`);
|
|
8106
|
+
}
|
|
8107
|
+
function extractMessageSequence(rows) {
|
|
8108
|
+
const messages = [];
|
|
8109
|
+
for (const row of rows) {
|
|
8110
|
+
const message = extractSingleMessage(row);
|
|
8111
|
+
if (message === null)
|
|
8112
|
+
return null;
|
|
8113
|
+
messages.push(message);
|
|
8114
|
+
}
|
|
8115
|
+
return messages.join(`
|
|
8116
|
+
|
|
8117
|
+
`);
|
|
8118
|
+
}
|
|
8119
|
+
function markdownRows(rows, depth) {
|
|
8120
|
+
if (rows.length === 0)
|
|
8121
|
+
return "(none)";
|
|
8122
|
+
if (!isPlainObjectArray(rows)) {
|
|
8123
|
+
return rows.map((item) => `- ${markdownCell(item)}`).join(`
|
|
8124
|
+
`);
|
|
8125
|
+
}
|
|
8126
|
+
const prose = extractMessageSequence(rows);
|
|
8127
|
+
if (prose !== null)
|
|
8128
|
+
return prose;
|
|
8129
|
+
const table = markdownTable(rows);
|
|
8130
|
+
if (table !== null)
|
|
8131
|
+
return table;
|
|
8132
|
+
if (depth >= MARKDOWN_MAX_DEPTH) {
|
|
8133
|
+
return fencedBlock(JSON.stringify(rows, null, 2));
|
|
8134
|
+
}
|
|
8135
|
+
return rows.map((row, index) => [
|
|
8136
|
+
`${markdownHeading(depth)} ${index + 1}`,
|
|
8137
|
+
markdownObject(row, depth + 1)
|
|
8138
|
+
].join(`
|
|
8139
|
+
|
|
8140
|
+
`)).join(`
|
|
8141
|
+
|
|
8142
|
+
`);
|
|
8143
|
+
}
|
|
8144
|
+
function markdownObject(obj, depth) {
|
|
8145
|
+
const scalars = [];
|
|
8146
|
+
const blocks = [];
|
|
8147
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
8148
|
+
if (value === undefined)
|
|
8149
|
+
continue;
|
|
8150
|
+
const label = markdownLabel(key);
|
|
8151
|
+
if (Array.isArray(value)) {
|
|
8152
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
8153
|
+
|
|
8154
|
+
${markdownRows(value, depth + 1)}`);
|
|
8155
|
+
} else if (isNonEmptyPlainObject(value)) {
|
|
8156
|
+
const nested = depth < MARKDOWN_MAX_DEPTH ? markdownObject(value, depth + 1) : fencedBlock(JSON.stringify(value, null, 2));
|
|
8157
|
+
if (nested !== "") {
|
|
8158
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
8159
|
+
|
|
8160
|
+
${nested}`);
|
|
8161
|
+
}
|
|
8162
|
+
} else if (typeof value === "string" && value.includes(`
|
|
8163
|
+
`)) {
|
|
8164
|
+
blocks.push(`**${label}:**
|
|
8165
|
+
|
|
8166
|
+
${fencedBlock(value)}`);
|
|
8167
|
+
} else {
|
|
8168
|
+
scalars.push(`**${label}:** ${markdownCell(value)}`);
|
|
8169
|
+
}
|
|
8170
|
+
}
|
|
8171
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
8172
|
+
`)] : [];
|
|
8173
|
+
sections.push(...blocks);
|
|
8174
|
+
return sections.join(`
|
|
8175
|
+
|
|
8176
|
+
`);
|
|
8177
|
+
}
|
|
8178
|
+
function extractSingleMessage(payload) {
|
|
8179
|
+
if (!isPlainRecord(payload))
|
|
8180
|
+
return null;
|
|
8181
|
+
const keys = Object.keys(payload);
|
|
8182
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
8183
|
+
return null;
|
|
8184
|
+
const value = payload[keys[0]];
|
|
8185
|
+
return typeof value === "string" ? value : null;
|
|
8186
|
+
}
|
|
8187
|
+
function markdownPayload(payload) {
|
|
8188
|
+
const message = extractSingleMessage(payload);
|
|
8189
|
+
if (message !== null)
|
|
8190
|
+
return message;
|
|
8191
|
+
if (Array.isArray(payload)) {
|
|
8192
|
+
return markdownRows(rowsWithoutPlumbing(payload), 0);
|
|
8193
|
+
}
|
|
8194
|
+
const visible = withoutPlumbing(payload);
|
|
8195
|
+
const paged = splitPagedEnvelope(visible);
|
|
8196
|
+
if (paged !== null) {
|
|
8197
|
+
const meta = markdownObject(paged.meta, 0);
|
|
8198
|
+
const rows = `${markdownHeading(0)} ${markdownLabel(paged.key)}
|
|
8199
|
+
|
|
8200
|
+
${markdownRows(rowsWithoutPlumbing(paged.rows), 1)}`;
|
|
8201
|
+
return meta === "" ? rows : `${meta}
|
|
8202
|
+
|
|
8203
|
+
${rows}`;
|
|
8204
|
+
}
|
|
8205
|
+
return markdownObject(visible, 0);
|
|
8206
|
+
}
|
|
8207
|
+
function isPaginationWorthShowing(value) {
|
|
8208
|
+
if (typeof value !== "object" || value === null)
|
|
8209
|
+
return false;
|
|
8210
|
+
const page = value;
|
|
8211
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
8212
|
+
}
|
|
8213
|
+
function markdownEnvelopeNotes(data) {
|
|
8214
|
+
const envelope = data;
|
|
8215
|
+
const notes = [];
|
|
8216
|
+
const warning = envelope.Warning;
|
|
8217
|
+
if (typeof warning === "string" && warning !== "") {
|
|
8218
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
8219
|
+
}
|
|
8220
|
+
const instructions = envelope.Instructions;
|
|
8221
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
8222
|
+
notes.push(`> ${instructions}`);
|
|
8223
|
+
}
|
|
8224
|
+
const pagination = envelope.Pagination;
|
|
8225
|
+
if (isPaginationWorthShowing(pagination)) {
|
|
8226
|
+
const body = markdownObject(pagination, 1);
|
|
8227
|
+
if (body !== "") {
|
|
8228
|
+
notes.push(`${markdownHeading(0)} Pagination
|
|
8229
|
+
|
|
8230
|
+
${body}`);
|
|
8231
|
+
}
|
|
8232
|
+
}
|
|
8233
|
+
const log = envelope.Log;
|
|
8234
|
+
if (typeof log === "string" && log !== "") {
|
|
8235
|
+
notes.push(`**Log:** ${log}`);
|
|
8236
|
+
}
|
|
8237
|
+
return notes;
|
|
8238
|
+
}
|
|
8239
|
+
function renderMarkdown(data) {
|
|
8240
|
+
if (data.Result !== RESULTS.Success) {
|
|
8241
|
+
const failure = data;
|
|
8242
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
8243
|
+
if (failure.Data != null) {
|
|
8244
|
+
sections.push(markdownPayload(failure.Data));
|
|
8245
|
+
}
|
|
8246
|
+
if (failure.Instructions) {
|
|
8247
|
+
sections.push(`> ${failure.Instructions}`);
|
|
8248
|
+
}
|
|
8249
|
+
return sections.filter((section) => section !== "").join(`
|
|
8250
|
+
|
|
8251
|
+
`);
|
|
8252
|
+
}
|
|
8253
|
+
if (!("Data" in data) || data.Data == null) {
|
|
8254
|
+
return markdownObject(withoutPlumbing(data), 0);
|
|
8255
|
+
}
|
|
8256
|
+
return [markdownPayload(data.Data), ...markdownEnvelopeNotes(data)].filter((section) => section !== "").join(`
|
|
8257
|
+
|
|
8258
|
+
`);
|
|
8259
|
+
}
|
|
8015
8260
|
function toYaml(data) {
|
|
8016
8261
|
const codec = getYamlCodec();
|
|
8017
8262
|
if (!codec) {
|
|
@@ -8114,12 +8359,13 @@ function defaultRetryForErrorCode(errorCode) {
|
|
|
8114
8359
|
return "RetryWillNotFix";
|
|
8115
8360
|
}
|
|
8116
8361
|
}
|
|
8117
|
-
var ANSI_STYLES, ANSI_RESET = "\x1B[0m", CLI_ERROR_CODES, RETRY_HINTS, CLI_ERROR_CODE_VALUES, RETRY_HINT_VALUES, RESULTS, EXIT_CODES, NESTED_INDENT = " ", FilterEvaluationError, FilterImplicitLimitError, LOCAL_PERMISSION_TEXT_PATTERN, OutputFormatter;
|
|
8362
|
+
var ANSI_STYLES, ANSI_RESET = "\x1B[0m", CLI_ERROR_CODES, RETRY_HINTS, CLI_ERROR_CODE_VALUES, RETRY_HINT_VALUES, RESULTS, EXIT_CODES, PLUMBING_KEYS, NESTED_INDENT = " ", MARKDOWN_MAX_CELL = 200, MARKDOWN_MAX_DEPTH = 3, BACKTICK_RUN, FilterEvaluationError, FilterImplicitLimitError, LOCAL_PERMISSION_TEXT_PATTERN, OutputFormatter;
|
|
8118
8363
|
var init_formatter = __esm(() => {
|
|
8119
8364
|
init_logger();
|
|
8120
8365
|
init_output_codecs();
|
|
8121
8366
|
init_output_context();
|
|
8122
8367
|
init_output_format_context();
|
|
8368
|
+
init_output_formats();
|
|
8123
8369
|
init_command_terminal();
|
|
8124
8370
|
init_telemetry_events();
|
|
8125
8371
|
init_telemetry_init();
|
|
@@ -8167,6 +8413,8 @@ var init_formatter = __esm(() => {
|
|
|
8167
8413
|
ValidationError: 3,
|
|
8168
8414
|
TimeoutError: 4
|
|
8169
8415
|
};
|
|
8416
|
+
PLUMBING_KEYS = new Set(["code", "log"]);
|
|
8417
|
+
BACKTICK_RUN = /`+/g;
|
|
8170
8418
|
FilterEvaluationError = class FilterEvaluationError extends Error {
|
|
8171
8419
|
__brand = "FilterEvaluationError";
|
|
8172
8420
|
filter;
|
|
@@ -10884,6 +11132,7 @@ var init_command_extensions = __esm(() => {
|
|
|
10884
11132
|
var init_command_help = __esm(() => {
|
|
10885
11133
|
init_command_examples();
|
|
10886
11134
|
init_output_context();
|
|
11135
|
+
init_output_formats();
|
|
10887
11136
|
});
|
|
10888
11137
|
// ../common/src/completer.ts
|
|
10889
11138
|
var COMPLETER_SYMBOL;
|
|
@@ -11481,4 +11730,4 @@ export {
|
|
|
11481
11730
|
readStdin
|
|
11482
11731
|
};
|
|
11483
11732
|
|
|
11484
|
-
//# debugId=
|
|
11733
|
+
//# debugId=2427805413A4C4BD64756E2164756E21
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BpmnLayoutResult } from "./layout.js";
|
|
2
|
+
/**
|
|
3
|
+
* Parse BPMN XML and return it with a generated `bpmndi:BPMNDiagram` section.
|
|
4
|
+
*
|
|
5
|
+
* The one-call form for callers that hold the XML as a string and have no file
|
|
6
|
+
* on disk to report errors against. Never throws — a caller uploading or
|
|
7
|
+
* previewing a file decides for itself whether an unlayoutable diagram is fatal.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyBpmnLayout(xml: string): Promise<BpmnLayoutResult>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BPMN diagram-interchange (`bpmndi:BPMNDiagram`) generation.
|
|
3
|
+
*
|
|
4
|
+
* DI is the optional half of a BPMN file that says where each node sits and how
|
|
5
|
+
* each flow is routed. Tools that emit process structure routinely omit it, and
|
|
6
|
+
* a viewer that builds its canvas from shapes has nothing to draw without it.
|
|
7
|
+
* This module computes a layout and writes that section back.
|
|
8
|
+
*/
|
|
9
|
+
export { applyBpmnLayout } from "./apply.js";
|
|
10
|
+
export { type BpmnLayoutResult, generateBpmnLayout } from "./layout.js";
|
|
11
|
+
export { type ParsedBpmnProcesses, parseBpmnProcesses, parseBpmnXml, } from "./parse.js";
|
|
12
|
+
export type { BpmnDiagram, BpmnElement, BpmnExtensionElements, BpmnExtensionValue, ParsedBpmnXml, } from "./types.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BpmnElement } from "./types.js";
|
|
2
|
+
export type BpmnLayoutResult = {
|
|
3
|
+
success: true;
|
|
4
|
+
content: string;
|
|
5
|
+
shapeCount: number;
|
|
6
|
+
edgeCount: number;
|
|
7
|
+
} | {
|
|
8
|
+
success: false;
|
|
9
|
+
message: string;
|
|
10
|
+
instructions: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function generateBpmnLayout(xml: string, processes: BpmnElement[]): Promise<BpmnLayoutResult>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BpmnElement, ParsedBpmnXml } from "./types.js";
|
|
2
|
+
export declare function parseBpmnXml(xml: string): Promise<ParsedBpmnXml>;
|
|
3
|
+
export type ParsedBpmnProcesses = {
|
|
4
|
+
ok: true;
|
|
5
|
+
root: BpmnElement;
|
|
6
|
+
processes: BpmnElement[];
|
|
7
|
+
} | {
|
|
8
|
+
ok: false;
|
|
9
|
+
message: string;
|
|
10
|
+
instructions: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Parse BPMN and confirm it carries at least one process.
|
|
14
|
+
*
|
|
15
|
+
* The single definition of both failures, so the wording a caller shows for
|
|
16
|
+
* unparseable input or a process-less file cannot drift between call sites.
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseBpmnProcesses(xml: string): Promise<ParsedBpmnProcesses>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The slice of bpmn-moddle's element tree the layout walks.
|
|
3
|
+
*
|
|
4
|
+
* Kept here rather than in a tool so that every consumer of the layout shares
|
|
5
|
+
* one definition of the shape it reads (Hard Rule #19).
|
|
6
|
+
*/
|
|
7
|
+
export type BpmnExtensionValue = {
|
|
8
|
+
$type?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
canonicalId?: string;
|
|
13
|
+
type?: string;
|
|
14
|
+
elementId?: string;
|
|
15
|
+
$body?: string;
|
|
16
|
+
$children?: BpmnExtensionValue[];
|
|
17
|
+
};
|
|
18
|
+
export type BpmnExtensionElements = {
|
|
19
|
+
values?: BpmnExtensionValue[];
|
|
20
|
+
};
|
|
21
|
+
export type BpmnElement = {
|
|
22
|
+
$type?: string;
|
|
23
|
+
$instanceOf?: (type: string) => boolean;
|
|
24
|
+
id?: string;
|
|
25
|
+
rootElements?: BpmnElement[];
|
|
26
|
+
flowElements?: BpmnElement[];
|
|
27
|
+
artifacts?: BpmnElement[];
|
|
28
|
+
extensionElements?: BpmnExtensionElements;
|
|
29
|
+
attachedToRef?: {
|
|
30
|
+
id?: string;
|
|
31
|
+
};
|
|
32
|
+
sourceRef?: {
|
|
33
|
+
id?: string;
|
|
34
|
+
};
|
|
35
|
+
targetRef?: {
|
|
36
|
+
id?: string;
|
|
37
|
+
};
|
|
38
|
+
diagrams?: BpmnDiagram[];
|
|
39
|
+
};
|
|
40
|
+
export type BpmnDiagram = {
|
|
41
|
+
plane?: {
|
|
42
|
+
planeElement?: Array<{
|
|
43
|
+
$type?: string;
|
|
44
|
+
bpmnElement?: {
|
|
45
|
+
id?: string;
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export type ParsedBpmnXml = {
|
|
51
|
+
root: BpmnElement;
|
|
52
|
+
processes: BpmnElement[];
|
|
53
|
+
};
|
|
@@ -10,6 +10,8 @@ export interface BpmnValidationDiagnostic {
|
|
|
10
10
|
message: string;
|
|
11
11
|
instruction: string;
|
|
12
12
|
severity?: "error" | "warning";
|
|
13
|
+
/** Stable code for a rule consumers branch on, mirroring canvas findings. */
|
|
14
|
+
ruleCode?: string;
|
|
13
15
|
}
|
|
14
16
|
export interface BpmnFileValidationContext {
|
|
15
17
|
projectPath: string;
|
|
@@ -53,10 +55,18 @@ export declare class BpmnValidateService {
|
|
|
53
55
|
private readonly options;
|
|
54
56
|
constructor(fileSystem: BpmnValidationFileSystem, options?: BpmnValidateServiceOptions);
|
|
55
57
|
validateProject(projectPath: string): Promise<BpmnValidationResult>;
|
|
58
|
+
validateProjectBindings(projectPath: string): Promise<BpmnValidationResult>;
|
|
56
59
|
private validateBpmnFile;
|
|
60
|
+
private recordJsonBindings;
|
|
61
|
+
private recordInlineBindings;
|
|
62
|
+
private validateDuplicateBindingKeys;
|
|
63
|
+
private validateVariableScopes;
|
|
57
64
|
private validateUnassignedVariables;
|
|
58
65
|
private reportUnassignedVariables;
|
|
59
66
|
private validateCallActivityReferences;
|
|
67
|
+
private validateScriptResponseWrapper;
|
|
68
|
+
private hasTopLevelResponseWrapper;
|
|
69
|
+
private validateScriptBareVariables;
|
|
60
70
|
private validateRootEntryPointIds;
|
|
61
71
|
private validateUiPathTags;
|
|
62
72
|
private validatePayload;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent-metadata reader hook, kept in a leaf module of its own.
|
|
3
|
+
*
|
|
4
|
+
* `agent.json` is agent-tool's format and the registry cannot parse it, so the
|
|
5
|
+
* tool that can registers a reader here at startup and solution discovery calls
|
|
6
|
+
* it when it walks a solution's projects.
|
|
7
|
+
*
|
|
8
|
+
* This lives apart from `solution-discovery.ts` — where it is used — only to
|
|
9
|
+
* keep the cost of *setting* it away from the cost of *doing* discovery.
|
|
10
|
+
* `solution-discovery.ts` imports `@uipath/flow-core/manifest`, so importing it
|
|
11
|
+
* pulls in ~1.5 MB (and the maestro-sdk root barrel pulls ~11 MB). A tool needs
|
|
12
|
+
* the setter on its registration path, which every `-h` runs, but needs
|
|
13
|
+
* discovery only when a command actually walks a solution. With the hook in a
|
|
14
|
+
* module that imports nothing, the `./registry/agent-metadata-reader` subpath
|
|
15
|
+
* costs a tool nothing to reach.
|
|
16
|
+
*
|
|
17
|
+
* Keep this module import-free.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Reads `metadata.isConversational` and `metadata.targetRuntime` from an agent
|
|
21
|
+
* project. Takes `projectType` rather than filtering itself, so no project type
|
|
22
|
+
* is named here (Hard Rule #19).
|
|
23
|
+
*/
|
|
24
|
+
export type AgentProjectMetadataReader = (projectDir: string, projectType: string) => Promise<Record<string, unknown>>;
|
|
25
|
+
export declare function setAgentProjectMetadataReader(reader: AgentProjectMetadataReader | undefined): void;
|
|
26
|
+
export declare function getAgentProjectMetadataReader(): AgentProjectMetadataReader | undefined;
|
|
@@ -50,11 +50,11 @@ export declare function fetchConnectionInfo(connectionId: string): Promise<Conne
|
|
|
50
50
|
export declare function fetchConnectorMetadata(connectorKey: string, objectName: string, connectionId?: string): Promise<ISMetadata>;
|
|
51
51
|
/**
|
|
52
52
|
* Fetch metadata for a 4.0.0 activity from the v4 elements endpoints.
|
|
53
|
-
* v4 activities are addressed by
|
|
53
|
+
* v4 activities are addressed by object name (`objectName` in the node's
|
|
54
54
|
* configuration JSON); the v4 route has no `/instances/{connectionId}` segment,
|
|
55
55
|
* so metadata is not connection-scoped.
|
|
56
56
|
*/
|
|
57
|
-
export declare function fetchConnectorActivityMetadataV4(connectorKey: string,
|
|
57
|
+
export declare function fetchConnectorActivityMetadataV4(connectorKey: string, objectName: string): Promise<ISMetadata>;
|
|
58
58
|
/**
|
|
59
59
|
* Unified enrichment entry point for connector nodes.
|
|
60
60
|
* Non-connector nodes are returned as-is.
|
|
@@ -22,10 +22,7 @@ export type CompactField = {
|
|
|
22
22
|
};
|
|
23
23
|
export type ConnectorConfiguration = {
|
|
24
24
|
connectorKey: string;
|
|
25
|
-
|
|
26
|
-
objectName?: string;
|
|
27
|
-
/** Present on 4.0.0 (standard) activities. Absent on v1 activities. */
|
|
28
|
-
activityName?: string;
|
|
25
|
+
objectName: string;
|
|
29
26
|
activityType: string;
|
|
30
27
|
version: string;
|
|
31
28
|
supportsStreaming: boolean;
|
|
@@ -5,7 +5,7 @@ import type { NodeManifest } from "@uipath/flow-core";
|
|
|
5
5
|
* stay valid for their full 30 minutes, so the nodes a fix just unblocked
|
|
6
6
|
* keep reading as "not found".
|
|
7
7
|
*/
|
|
8
|
-
export declare const CACHE_FORMAT_VERSION =
|
|
8
|
+
export declare const CACHE_FORMAT_VERSION = 5;
|
|
9
9
|
export interface SearchableNode {
|
|
10
10
|
nodeType?: string;
|
|
11
11
|
category?: string;
|
|
@@ -65,7 +65,7 @@ export declare function getNode(nodeType: string, options?: {
|
|
|
65
65
|
* When connectionId is provided, enriches connector nodes with
|
|
66
66
|
* connection-specific metadata (custom fields, accurate references).
|
|
67
67
|
* The v3-vs-v4 elements route is picked from the node's own configuration
|
|
68
|
-
* (a 4.0.0 version
|
|
68
|
+
* (a 4.0.0 version routes to the v4 endpoints).
|
|
69
69
|
*/
|
|
70
70
|
export declare function getNodeEnriched(nodeType: string, connectionId?: string, options?: {
|
|
71
71
|
local?: boolean;
|