@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
|
@@ -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;
|
|
@@ -12201,16 +12450,7 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
12201
12450
|
absolutePath: undefined,
|
|
12202
12451
|
errorMessage: location.source === "absolute" ? `Environment file not found: ${envFilePath}` : `Unable to locate environment file: ${envFilePath}. Run 'uip login' to authenticate.`
|
|
12203
12452
|
};
|
|
12204
|
-
},
|
|
12205
|
-
const fs7 = getFileSystem();
|
|
12206
|
-
const absolutePath = fs7.path.isAbsolute(envPath) ? envPath : fs7.path.join(fs7.env.cwd(), envPath);
|
|
12207
|
-
if (!await fs7.exists(absolutePath)) {
|
|
12208
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
12209
|
-
}
|
|
12210
|
-
const content = await fs7.readFile(absolutePath, "utf-8");
|
|
12211
|
-
if (content === null) {
|
|
12212
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
12213
|
-
}
|
|
12453
|
+
}, parseEnvContent = (content) => {
|
|
12214
12454
|
const env = {};
|
|
12215
12455
|
for (const line of content.split(`
|
|
12216
12456
|
`)) {
|
|
@@ -12230,6 +12470,17 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
12230
12470
|
env[key] = value;
|
|
12231
12471
|
}
|
|
12232
12472
|
return env;
|
|
12473
|
+
}, loadEnvFileAsync = async ({ envPath }) => {
|
|
12474
|
+
const fs7 = getFileSystem();
|
|
12475
|
+
const absolutePath = fs7.path.isAbsolute(envPath) ? envPath : fs7.path.join(fs7.env.cwd(), envPath);
|
|
12476
|
+
if (!await fs7.exists(absolutePath)) {
|
|
12477
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
12478
|
+
}
|
|
12479
|
+
const content = await fs7.readFile(absolutePath, "utf-8");
|
|
12480
|
+
if (content === null) {
|
|
12481
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
12482
|
+
}
|
|
12483
|
+
return parseEnvContent(content);
|
|
12233
12484
|
}, saveEnvFileAsync = async ({
|
|
12234
12485
|
envPath,
|
|
12235
12486
|
data,
|
|
@@ -12797,6 +13048,14 @@ var init_authContext = __esm(() => {
|
|
|
12797
13048
|
init_loginStatus();
|
|
12798
13049
|
});
|
|
12799
13050
|
|
|
13051
|
+
// ../auth/src/authProfileDetails.ts
|
|
13052
|
+
var init_authProfileDetails = __esm(() => {
|
|
13053
|
+
init_src();
|
|
13054
|
+
init_authProfile();
|
|
13055
|
+
init_envFile();
|
|
13056
|
+
init_jwt();
|
|
13057
|
+
});
|
|
13058
|
+
|
|
12800
13059
|
// ../auth/src/tokenGrant.ts
|
|
12801
13060
|
var init_tokenGrant = () => {};
|
|
12802
13061
|
|
|
@@ -12867,6 +13126,7 @@ var init_src3 = __esm(() => {
|
|
|
12867
13126
|
init_jwt();
|
|
12868
13127
|
init_authContext();
|
|
12869
13128
|
init_authProfile();
|
|
13129
|
+
init_authProfileDetails();
|
|
12870
13130
|
init_clientCredentials();
|
|
12871
13131
|
init_interactive();
|
|
12872
13132
|
init_loginStatus();
|
|
@@ -13201,7 +13461,12 @@ function injectSolutionProjectProcessEntries(fpsProperties, solutionProjects) {
|
|
|
13201
13461
|
const entries = solutionProjects.map((project) => ({
|
|
13202
13462
|
name: project.name,
|
|
13203
13463
|
projectType: project.projectType,
|
|
13204
|
-
executorInfo: JSON.stringify({
|
|
13464
|
+
executorInfo: JSON.stringify(project.projectType === "Function" ? {
|
|
13465
|
+
projectId: project.projectId,
|
|
13466
|
+
command: "debug",
|
|
13467
|
+
args: ["--attach=none"],
|
|
13468
|
+
entryPoint: project.entryPoint
|
|
13469
|
+
} : {
|
|
13205
13470
|
projectId: project.projectId,
|
|
13206
13471
|
debugArgs: {
|
|
13207
13472
|
debugMode: project.debugMode ?? DEBUG_MODE_MAP.Default,
|
|
@@ -13419,6 +13684,7 @@ var PIMS_TERMINAL_STATUSES = [
|
|
|
13419
13684
|
"Cancelled",
|
|
13420
13685
|
"Failed"
|
|
13421
13686
|
];
|
|
13687
|
+
var ORCHESTRATOR_JOB_KEY = /^[0-9a-fA-F-]+$/;
|
|
13422
13688
|
var ORCHESTRATOR_TERMINAL_STATUSES = [
|
|
13423
13689
|
"Successful",
|
|
13424
13690
|
"Faulted",
|
|
@@ -13465,6 +13731,10 @@ function buildPollTimeoutFailureOutput(err, inspectCommand) {
|
|
|
13465
13731
|
async function pollDebugInstanceStatus(config, instanceId, callbacks, pollInterval = 2000, maxPolls = 300, jobKey) {
|
|
13466
13732
|
let pollCount = 0;
|
|
13467
13733
|
let lastStatus = "";
|
|
13734
|
+
const canCheckOrchestratorJob = jobKey !== undefined && ORCHESTRATOR_JOB_KEY.test(jobKey);
|
|
13735
|
+
if (jobKey !== undefined && !canCheckOrchestratorJob) {
|
|
13736
|
+
logger.warn(`Skipping the Orchestrator job status fallback: "${jobKey}" is not a job key.`);
|
|
13737
|
+
}
|
|
13468
13738
|
while (pollCount < maxPolls) {
|
|
13469
13739
|
const status = await debugPimsGet(config, `/api/v1/debug-instances/${instanceId}/element-executions`, "poll-instance-status");
|
|
13470
13740
|
if (status.status !== lastStatus) {
|
|
@@ -13485,8 +13755,8 @@ async function pollDebugInstanceStatus(config, instanceId, callbacks, pollInterv
|
|
|
13485
13755
|
logger.info(`Debug session reached terminal status: ${status.status}`);
|
|
13486
13756
|
return status;
|
|
13487
13757
|
}
|
|
13488
|
-
if (
|
|
13489
|
-
const [, jobResponse] = await catchError(orchestratorGet(config, `/odata/Jobs?$filter=Key eq
|
|
13758
|
+
if (canCheckOrchestratorJob && pollCount > 0 && pollCount % 5 === 0) {
|
|
13759
|
+
const [, jobResponse] = await catchError(orchestratorGet(config, `/odata/Jobs?$filter=Key eq ${jobKey}&$top=1`, "check-orchestrator-job-status"));
|
|
13490
13760
|
const jobState = jobResponse?.value?.[0]?.State;
|
|
13491
13761
|
if (jobState && ORCHESTRATOR_TERMINAL_STATUSES.includes(jobState)) {
|
|
13492
13762
|
const jobInfo = jobResponse?.value?.[0]?.Info ?? "";
|
|
@@ -15202,4 +15472,4 @@ export {
|
|
|
15202
15472
|
registerSharedProcessesCommands
|
|
15203
15473
|
};
|
|
15204
15474
|
|
|
15205
|
-
//# debugId=
|
|
15475
|
+
//# debugId=F9E9AFD48711C26B64756E2164756E21
|