@uipath/ixp-tool 1.202.0 → 1.203.0-preview.160
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/index.js +1 -1
- package/dist/{tool-p87c7c1b.js → tool-9kc80pdd.js} +317 -36
- package/dist/tool.js +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -2099,8 +2099,9 @@ var require_commander = __commonJS(function(exports) {
|
|
|
2099
2099
|
// package.json
|
|
2100
2100
|
var package_default = {
|
|
2101
2101
|
name: "@uipath/ixp-tool",
|
|
2102
|
+
author: "UiPath",
|
|
2102
2103
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
2103
|
-
version: "1.
|
|
2104
|
+
version: "1.203.0-preview.160",
|
|
2104
2105
|
description: "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
|
|
2105
2106
|
private: false,
|
|
2106
2107
|
repository: {
|
|
@@ -2655,7 +2656,7 @@ var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{1
|
|
|
2655
2656
|
var EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
2656
2657
|
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
2657
2658
|
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
2658
|
-
var PADDED_BASE64_PATTERN = /[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
2659
|
+
var PADDED_BASE64_PATTERN = /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
2659
2660
|
var BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
|
|
2660
2661
|
var USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
|
|
2661
2662
|
var UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
|
|
@@ -2702,7 +2703,7 @@ var QUOTED_LITERAL_PATTERN = new RegExp([
|
|
|
2702
2703
|
`(?<![A-Za-z0-9])"(?:[^\\
|
|
2703
2704
|
]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
|
|
2704
2705
|
].join("|"), "g");
|
|
2705
|
-
var JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
|
|
2706
|
+
var JSON_BODY_PATTERN = /[{[][^{}[\]:,]*[:,][^{}[\]]*[\]}]/g;
|
|
2706
2707
|
var COLLAPSED_BODY = "{…}";
|
|
2707
2708
|
var COLLAPSED_BODY_MARKER = "\x01body\x01";
|
|
2708
2709
|
var MAX_BODY_NESTING = 8;
|
|
@@ -2717,10 +2718,13 @@ function collapseJsonBodies(text) {
|
|
|
2717
2718
|
}
|
|
2718
2719
|
return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
|
|
2719
2720
|
}
|
|
2720
|
-
var TRAILING_PROSE_PUNCT =
|
|
2721
|
+
var TRAILING_PROSE_PUNCT = `.,;:!?)]}>'"`;
|
|
2721
2722
|
function peelTrailingPunctuation(match) {
|
|
2722
|
-
|
|
2723
|
-
|
|
2723
|
+
let end = match.length;
|
|
2724
|
+
while (end > 0 && TRAILING_PROSE_PUNCT.includes(match[end - 1])) {
|
|
2725
|
+
end -= 1;
|
|
2726
|
+
}
|
|
2727
|
+
return [match.slice(0, end), match.slice(end)];
|
|
2724
2728
|
}
|
|
2725
2729
|
function redactUrl(raw) {
|
|
2726
2730
|
try {
|
|
@@ -3023,6 +3027,22 @@ function parseHttpStatusFromMessage(message) {
|
|
|
3023
3027
|
const status = Number(match[1]);
|
|
3024
3028
|
return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
3025
3029
|
}
|
|
3030
|
+
function findHttpStatusInGraph(error) {
|
|
3031
|
+
for (const node of walkErrorGraph(error)) {
|
|
3032
|
+
const response = node.response;
|
|
3033
|
+
const explicit = typeof node.status === "number" ? node.status : response?.status;
|
|
3034
|
+
if (typeof explicit === "number" && explicit >= 400 && explicit <= 599) {
|
|
3035
|
+
return explicit;
|
|
3036
|
+
}
|
|
3037
|
+
if (typeof node.message === "string") {
|
|
3038
|
+
const parsed = parseHttpStatusFromMessage(node.message);
|
|
3039
|
+
if (parsed !== undefined && parsed >= 400) {
|
|
3040
|
+
return parsed;
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
return;
|
|
3045
|
+
}
|
|
3026
3046
|
function isHtmlDocument(body) {
|
|
3027
3047
|
return /^\s*(<!doctype html|<html\b)/i.test(body);
|
|
3028
3048
|
}
|
|
@@ -3136,7 +3156,8 @@ async function extractErrorDetails(error, options) {
|
|
|
3136
3156
|
}
|
|
3137
3157
|
let message;
|
|
3138
3158
|
let result = "Failure";
|
|
3139
|
-
const
|
|
3159
|
+
const classificationStatus = status ?? findHttpStatusInGraph(error);
|
|
3160
|
+
const classification = classifyError(classificationStatus, error);
|
|
3140
3161
|
let retry = classification.retry;
|
|
3141
3162
|
if (status === 401) {
|
|
3142
3163
|
message = DEFAULT_401;
|
|
@@ -3212,8 +3233,8 @@ async function extractErrorDetails(error, options) {
|
|
|
3212
3233
|
details = describeThrownValue(error);
|
|
3213
3234
|
}
|
|
3214
3235
|
const context = {};
|
|
3215
|
-
if (
|
|
3216
|
-
context.httpStatus =
|
|
3236
|
+
if (classificationStatus) {
|
|
3237
|
+
context.httpStatus = classificationStatus;
|
|
3217
3238
|
}
|
|
3218
3239
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
3219
3240
|
context.errorCode = parsedBody.errorCode;
|
|
@@ -3771,7 +3792,8 @@ function readRegistryValue(keyPath, valueName) {
|
|
|
3771
3792
|
}
|
|
3772
3793
|
const [error, output] = catchError(() => execFileSync("reg", ["query", keyPath, "/v", valueName], {
|
|
3773
3794
|
encoding: "utf-8",
|
|
3774
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
3795
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
3796
|
+
windowsHide: true
|
|
3775
3797
|
}));
|
|
3776
3798
|
if (error) {
|
|
3777
3799
|
return "";
|
|
@@ -4347,6 +4369,12 @@ var slot = singleton("ProxyAuthHttpsAgent");
|
|
|
4347
4369
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
4348
4370
|
var providerSlot = singleton("TelemetryProvider");
|
|
4349
4371
|
|
|
4372
|
+
// ../common/src/telemetry/telemetry-config.ts
|
|
4373
|
+
function isTelemetryDisabled() {
|
|
4374
|
+
const value = process.env.UIPATH_TELEMETRY_DISABLED;
|
|
4375
|
+
return value === "1" || value === "true";
|
|
4376
|
+
}
|
|
4377
|
+
|
|
4350
4378
|
// ../common/src/telemetry/telemetry-spool.ts
|
|
4351
4379
|
var sidecarEntrySlot = singleton("TelemetrySidecarEntry");
|
|
4352
4380
|
var MAX_SPOOL_AGE_MS = 72 * 60 * 60 * 1000;
|
|
@@ -4453,28 +4481,32 @@ function isPlainRecord(value) {
|
|
|
4453
4481
|
const prototype = Object.getPrototypeOf(value);
|
|
4454
4482
|
return prototype === Object.prototype || prototype === null;
|
|
4455
4483
|
}
|
|
4456
|
-
function
|
|
4484
|
+
function splitPagedEnvelope(value) {
|
|
4457
4485
|
if (Array.isArray(value) || !isPlainRecord(value))
|
|
4458
4486
|
return null;
|
|
4459
|
-
const entries = Object.
|
|
4487
|
+
const entries = Object.entries(value);
|
|
4460
4488
|
if (entries.length === 0)
|
|
4461
4489
|
return null;
|
|
4462
|
-
let
|
|
4463
|
-
|
|
4464
|
-
for (const entry of entries) {
|
|
4490
|
+
let found = null;
|
|
4491
|
+
const meta = Object.create(null);
|
|
4492
|
+
for (const [key, entry] of entries) {
|
|
4465
4493
|
if (Array.isArray(entry)) {
|
|
4466
|
-
if (
|
|
4494
|
+
if (found !== null)
|
|
4467
4495
|
return null;
|
|
4468
|
-
|
|
4496
|
+
found = { key, rows: entry };
|
|
4469
4497
|
} else if (entry !== null && typeof entry === "object") {
|
|
4470
4498
|
return null;
|
|
4471
4499
|
} else {
|
|
4472
|
-
|
|
4500
|
+
meta[key] = entry;
|
|
4473
4501
|
}
|
|
4474
4502
|
}
|
|
4475
|
-
if (
|
|
4503
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
4476
4504
|
return null;
|
|
4477
|
-
return
|
|
4505
|
+
return { ...found, meta };
|
|
4506
|
+
}
|
|
4507
|
+
function extractPagedRows(value) {
|
|
4508
|
+
const paged = splitPagedEnvelope(value);
|
|
4509
|
+
return paged === null ? null : paged.rows;
|
|
4478
4510
|
}
|
|
4479
4511
|
function toLowerCamelCaseKey(key) {
|
|
4480
4512
|
if (!key)
|
|
@@ -4578,6 +4610,9 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
4578
4610
|
}
|
|
4579
4611
|
break;
|
|
4580
4612
|
}
|
|
4613
|
+
case "markdown":
|
|
4614
|
+
logFn(renderMarkdown(data));
|
|
4615
|
+
break;
|
|
4581
4616
|
default: {
|
|
4582
4617
|
const hasData = "Data" in data && data.Data != null;
|
|
4583
4618
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
@@ -4602,6 +4637,10 @@ function logOutput(data, format = "json", tableRowStyle) {
|
|
|
4602
4637
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
4603
4638
|
`), needsAsciiSafeJson(sink), styleFn);
|
|
4604
4639
|
}
|
|
4640
|
+
var PLUMBING_KEYS = new Set(["code", "log"]);
|
|
4641
|
+
function isPlumbingKey(key) {
|
|
4642
|
+
return PLUMBING_KEYS.has(key.toLowerCase());
|
|
4643
|
+
}
|
|
4605
4644
|
function cellToString(val) {
|
|
4606
4645
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
4607
4646
|
}
|
|
@@ -4617,7 +4656,7 @@ function wrapText(text, width) {
|
|
|
4617
4656
|
function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
4618
4657
|
if (data.length === 0)
|
|
4619
4658
|
return;
|
|
4620
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
4659
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
4621
4660
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
|
|
4622
4661
|
const header = keys.map((key, i) => key.padEnd(maxWidths[i])).join(" | ");
|
|
4623
4662
|
logFn(header);
|
|
@@ -4639,7 +4678,7 @@ function isNonEmptyPlainObject(value) {
|
|
|
4639
4678
|
}
|
|
4640
4679
|
var NESTED_INDENT = " ";
|
|
4641
4680
|
function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
4642
|
-
const keys = Object.keys(data).filter((key) => !
|
|
4681
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey(key));
|
|
4643
4682
|
if (keys.length === 0)
|
|
4644
4683
|
return;
|
|
4645
4684
|
const isBlockValue = (value) => isPlainObjectArray(value) || isNonEmptyPlainObject(value);
|
|
@@ -4670,7 +4709,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
|
4670
4709
|
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
4671
4710
|
if (data.length === 0)
|
|
4672
4711
|
return;
|
|
4673
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
4712
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
4674
4713
|
if (keys.length === 0)
|
|
4675
4714
|
return;
|
|
4676
4715
|
if (!process.stdout.isTTY) {
|
|
@@ -4744,6 +4783,220 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
4744
4783
|
logFn(`Log: ${externalLogValue}`);
|
|
4745
4784
|
}
|
|
4746
4785
|
}
|
|
4786
|
+
var MARKDOWN_MAX_CELL = 200;
|
|
4787
|
+
var MARKDOWN_MAX_DEPTH = 3;
|
|
4788
|
+
function markdownHeading(depth) {
|
|
4789
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
4790
|
+
}
|
|
4791
|
+
var BACKTICK_RUN = /`+/g;
|
|
4792
|
+
function fencedBlock(text) {
|
|
4793
|
+
const first = text.trimStart()[0];
|
|
4794
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
4795
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN), (match) => match[0].length));
|
|
4796
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
4797
|
+
return `${fence}${language}
|
|
4798
|
+
${text}
|
|
4799
|
+
${fence}`;
|
|
4800
|
+
}
|
|
4801
|
+
function collapseNewlineRuns(text) {
|
|
4802
|
+
return text.split(/(\s+)/).map((part, index) => index % 2 === 1 && part.includes(`
|
|
4803
|
+
`) ? " " : part).join("");
|
|
4804
|
+
}
|
|
4805
|
+
function markdownCell(value) {
|
|
4806
|
+
const text = value instanceof Date ? value.toISOString() : cellToString(value);
|
|
4807
|
+
return collapseNewlineRuns(text).replace(/\|/g, "\\|");
|
|
4808
|
+
}
|
|
4809
|
+
function markdownLabel(key) {
|
|
4810
|
+
return collapseNewlineRuns(key).replace(/[\\`*|]/g, "\\$&");
|
|
4811
|
+
}
|
|
4812
|
+
function withoutPlumbing(record) {
|
|
4813
|
+
const kept = Object.create(null);
|
|
4814
|
+
for (const [key, value] of Object.entries(record)) {
|
|
4815
|
+
if (!isPlumbingKey(key))
|
|
4816
|
+
kept[key] = value;
|
|
4817
|
+
}
|
|
4818
|
+
return kept;
|
|
4819
|
+
}
|
|
4820
|
+
function rowsWithoutPlumbing(rows) {
|
|
4821
|
+
return rows.map((row) => isPlainRecord(row) ? withoutPlumbing(row) : row);
|
|
4822
|
+
}
|
|
4823
|
+
function markdownTable(rows) {
|
|
4824
|
+
const columns = [];
|
|
4825
|
+
const seen = new Set;
|
|
4826
|
+
for (const row of rows) {
|
|
4827
|
+
for (const key of Object.keys(row)) {
|
|
4828
|
+
if (!seen.has(key)) {
|
|
4829
|
+
seen.add(key);
|
|
4830
|
+
columns.push(key);
|
|
4831
|
+
}
|
|
4832
|
+
}
|
|
4833
|
+
}
|
|
4834
|
+
if (columns.length === 0)
|
|
4835
|
+
return null;
|
|
4836
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell(row[key])));
|
|
4837
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL))) {
|
|
4838
|
+
return null;
|
|
4839
|
+
}
|
|
4840
|
+
return [
|
|
4841
|
+
`| ${columns.map(markdownLabel).join(" | ")} |`,
|
|
4842
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
4843
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
4844
|
+
].join(`
|
|
4845
|
+
`);
|
|
4846
|
+
}
|
|
4847
|
+
function extractMessageSequence(rows) {
|
|
4848
|
+
const messages = [];
|
|
4849
|
+
for (const row of rows) {
|
|
4850
|
+
const message = extractSingleMessage(row);
|
|
4851
|
+
if (message === null)
|
|
4852
|
+
return null;
|
|
4853
|
+
messages.push(message);
|
|
4854
|
+
}
|
|
4855
|
+
return messages.join(`
|
|
4856
|
+
|
|
4857
|
+
`);
|
|
4858
|
+
}
|
|
4859
|
+
function markdownRows(rows, depth) {
|
|
4860
|
+
if (rows.length === 0)
|
|
4861
|
+
return "(none)";
|
|
4862
|
+
if (!isPlainObjectArray(rows)) {
|
|
4863
|
+
return rows.map((item) => `- ${markdownCell(item)}`).join(`
|
|
4864
|
+
`);
|
|
4865
|
+
}
|
|
4866
|
+
const prose = extractMessageSequence(rows);
|
|
4867
|
+
if (prose !== null)
|
|
4868
|
+
return prose;
|
|
4869
|
+
const table = markdownTable(rows);
|
|
4870
|
+
if (table !== null)
|
|
4871
|
+
return table;
|
|
4872
|
+
if (depth >= MARKDOWN_MAX_DEPTH) {
|
|
4873
|
+
return fencedBlock(JSON.stringify(rows, null, 2));
|
|
4874
|
+
}
|
|
4875
|
+
return rows.map((row, index) => [
|
|
4876
|
+
`${markdownHeading(depth)} ${index + 1}`,
|
|
4877
|
+
markdownObject(row, depth + 1)
|
|
4878
|
+
].join(`
|
|
4879
|
+
|
|
4880
|
+
`)).join(`
|
|
4881
|
+
|
|
4882
|
+
`);
|
|
4883
|
+
}
|
|
4884
|
+
function markdownObject(obj, depth) {
|
|
4885
|
+
const scalars = [];
|
|
4886
|
+
const blocks = [];
|
|
4887
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
4888
|
+
if (value === undefined)
|
|
4889
|
+
continue;
|
|
4890
|
+
const label = markdownLabel(key);
|
|
4891
|
+
if (Array.isArray(value)) {
|
|
4892
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
4893
|
+
|
|
4894
|
+
${markdownRows(value, depth + 1)}`);
|
|
4895
|
+
} else if (isNonEmptyPlainObject(value)) {
|
|
4896
|
+
const nested = depth < MARKDOWN_MAX_DEPTH ? markdownObject(value, depth + 1) : fencedBlock(JSON.stringify(value, null, 2));
|
|
4897
|
+
if (nested !== "") {
|
|
4898
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
4899
|
+
|
|
4900
|
+
${nested}`);
|
|
4901
|
+
}
|
|
4902
|
+
} else if (typeof value === "string" && value.includes(`
|
|
4903
|
+
`)) {
|
|
4904
|
+
blocks.push(`**${label}:**
|
|
4905
|
+
|
|
4906
|
+
${fencedBlock(value)}`);
|
|
4907
|
+
} else {
|
|
4908
|
+
scalars.push(`**${label}:** ${markdownCell(value)}`);
|
|
4909
|
+
}
|
|
4910
|
+
}
|
|
4911
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
4912
|
+
`)] : [];
|
|
4913
|
+
sections.push(...blocks);
|
|
4914
|
+
return sections.join(`
|
|
4915
|
+
|
|
4916
|
+
`);
|
|
4917
|
+
}
|
|
4918
|
+
function extractSingleMessage(payload) {
|
|
4919
|
+
if (!isPlainRecord(payload))
|
|
4920
|
+
return null;
|
|
4921
|
+
const keys = Object.keys(payload);
|
|
4922
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
4923
|
+
return null;
|
|
4924
|
+
const value = payload[keys[0]];
|
|
4925
|
+
return typeof value === "string" ? value : null;
|
|
4926
|
+
}
|
|
4927
|
+
function markdownPayload(payload) {
|
|
4928
|
+
const message = extractSingleMessage(payload);
|
|
4929
|
+
if (message !== null)
|
|
4930
|
+
return message;
|
|
4931
|
+
if (Array.isArray(payload)) {
|
|
4932
|
+
return markdownRows(rowsWithoutPlumbing(payload), 0);
|
|
4933
|
+
}
|
|
4934
|
+
const visible = withoutPlumbing(payload);
|
|
4935
|
+
const paged = splitPagedEnvelope(visible);
|
|
4936
|
+
if (paged !== null) {
|
|
4937
|
+
const meta = markdownObject(paged.meta, 0);
|
|
4938
|
+
const rows = `${markdownHeading(0)} ${markdownLabel(paged.key)}
|
|
4939
|
+
|
|
4940
|
+
${markdownRows(rowsWithoutPlumbing(paged.rows), 1)}`;
|
|
4941
|
+
return meta === "" ? rows : `${meta}
|
|
4942
|
+
|
|
4943
|
+
${rows}`;
|
|
4944
|
+
}
|
|
4945
|
+
return markdownObject(visible, 0);
|
|
4946
|
+
}
|
|
4947
|
+
function isPaginationWorthShowing(value) {
|
|
4948
|
+
if (typeof value !== "object" || value === null)
|
|
4949
|
+
return false;
|
|
4950
|
+
const page = value;
|
|
4951
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
4952
|
+
}
|
|
4953
|
+
function markdownEnvelopeNotes(data) {
|
|
4954
|
+
const envelope = data;
|
|
4955
|
+
const notes = [];
|
|
4956
|
+
const warning = envelope.Warning;
|
|
4957
|
+
if (typeof warning === "string" && warning !== "") {
|
|
4958
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
4959
|
+
}
|
|
4960
|
+
const instructions = envelope.Instructions;
|
|
4961
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
4962
|
+
notes.push(`> ${instructions}`);
|
|
4963
|
+
}
|
|
4964
|
+
const pagination = envelope.Pagination;
|
|
4965
|
+
if (isPaginationWorthShowing(pagination)) {
|
|
4966
|
+
const body = markdownObject(pagination, 1);
|
|
4967
|
+
if (body !== "") {
|
|
4968
|
+
notes.push(`${markdownHeading(0)} Pagination
|
|
4969
|
+
|
|
4970
|
+
${body}`);
|
|
4971
|
+
}
|
|
4972
|
+
}
|
|
4973
|
+
const log = envelope.Log;
|
|
4974
|
+
if (typeof log === "string" && log !== "") {
|
|
4975
|
+
notes.push(`**Log:** ${log}`);
|
|
4976
|
+
}
|
|
4977
|
+
return notes;
|
|
4978
|
+
}
|
|
4979
|
+
function renderMarkdown(data) {
|
|
4980
|
+
if (data.Result !== RESULTS.Success) {
|
|
4981
|
+
const failure = data;
|
|
4982
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
4983
|
+
if (failure.Data != null) {
|
|
4984
|
+
sections.push(markdownPayload(failure.Data));
|
|
4985
|
+
}
|
|
4986
|
+
if (failure.Instructions) {
|
|
4987
|
+
sections.push(`> ${failure.Instructions}`);
|
|
4988
|
+
}
|
|
4989
|
+
return sections.filter((section) => section !== "").join(`
|
|
4990
|
+
|
|
4991
|
+
`);
|
|
4992
|
+
}
|
|
4993
|
+
if (!("Data" in data) || data.Data == null) {
|
|
4994
|
+
return markdownObject(withoutPlumbing(data), 0);
|
|
4995
|
+
}
|
|
4996
|
+
return [markdownPayload(data.Data), ...markdownEnvelopeNotes(data)].filter((section) => section !== "").join(`
|
|
4997
|
+
|
|
4998
|
+
`);
|
|
4999
|
+
}
|
|
4747
5000
|
function toYaml(data) {
|
|
4748
5001
|
const codec = getYamlCodec();
|
|
4749
5002
|
if (!codec) {
|
|
@@ -5736,6 +5989,9 @@ var ScreenLogger;
|
|
|
5736
5989
|
ScreenLogger.progress = progress;
|
|
5737
5990
|
})(ScreenLogger ||= {});
|
|
5738
5991
|
// ../common/src/sdk-user-agent.ts
|
|
5992
|
+
var CODING_AGENT_HEADER = "x-coding-agent-info";
|
|
5993
|
+
var AGENT_PROPERTY = "agent";
|
|
5994
|
+
var CODING_AGENT_PROPERTY = "CodingAgent";
|
|
5739
5995
|
var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
|
|
5740
5996
|
function splitUserAgentTokens(value) {
|
|
5741
5997
|
return value?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
@@ -5754,10 +6010,31 @@ function appendUserAgentToken(value, userAgent) {
|
|
|
5754
6010
|
function getEffectiveUserAgent(userAgent) {
|
|
5755
6011
|
return appendUserAgentToken(sdkUserAgentHostToken.get(), userAgent);
|
|
5756
6012
|
}
|
|
6013
|
+
function getHeaderName(headers, headerName) {
|
|
6014
|
+
return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
|
|
6015
|
+
}
|
|
6016
|
+
function getSdkAgentInfo() {
|
|
6017
|
+
if (isTelemetryDisabled()) {
|
|
6018
|
+
return;
|
|
6019
|
+
}
|
|
6020
|
+
const agent = getGlobalTelemetryProperties()?.[AGENT_PROPERTY];
|
|
6021
|
+
return agent === undefined ? undefined : String(agent);
|
|
6022
|
+
}
|
|
5757
6023
|
function getSdkUserAgentToken(pkg) {
|
|
5758
6024
|
const packageName = pkg.name.replace(/^@uipath\//, "");
|
|
5759
6025
|
return getEffectiveUserAgent(`${packageName}/${pkg.version}`);
|
|
5760
6026
|
}
|
|
6027
|
+
function addSdkCodingAgentHeader(headers, agent = getSdkAgentInfo()) {
|
|
6028
|
+
const result = { ...headers ?? {} };
|
|
6029
|
+
if (agent === undefined) {
|
|
6030
|
+
return result;
|
|
6031
|
+
}
|
|
6032
|
+
const headerName = getHeaderName(result, CODING_AGENT_HEADER);
|
|
6033
|
+
result[headerName ?? CODING_AGENT_HEADER] = JSON.stringify({
|
|
6034
|
+
[CODING_AGENT_PROPERTY]: agent
|
|
6035
|
+
});
|
|
6036
|
+
return result;
|
|
6037
|
+
}
|
|
5761
6038
|
// ../common/src/telemetry/ship-succeeded.ts
|
|
5762
6039
|
var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
|
|
5763
6040
|
function getShippedKeys() {
|
|
@@ -6569,16 +6846,7 @@ var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) =
|
|
|
6569
6846
|
errorMessage: location.source === "absolute" ? `Environment file not found: ${envFilePath}` : `Unable to locate environment file: ${envFilePath}. Run 'uip login' to authenticate.`
|
|
6570
6847
|
};
|
|
6571
6848
|
};
|
|
6572
|
-
var
|
|
6573
|
-
const fs2 = getFileSystem();
|
|
6574
|
-
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
6575
|
-
if (!await fs2.exists(absolutePath)) {
|
|
6576
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
6577
|
-
}
|
|
6578
|
-
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
6579
|
-
if (content === null) {
|
|
6580
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
6581
|
-
}
|
|
6849
|
+
var parseEnvContent = (content) => {
|
|
6582
6850
|
const env = {};
|
|
6583
6851
|
for (const line of content.split(`
|
|
6584
6852
|
`)) {
|
|
@@ -6599,6 +6867,18 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
6599
6867
|
}
|
|
6600
6868
|
return env;
|
|
6601
6869
|
};
|
|
6870
|
+
var loadEnvFileAsync = async ({ envPath }) => {
|
|
6871
|
+
const fs2 = getFileSystem();
|
|
6872
|
+
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
6873
|
+
if (!await fs2.exists(absolutePath)) {
|
|
6874
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
6875
|
+
}
|
|
6876
|
+
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
6877
|
+
if (content === null) {
|
|
6878
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
6879
|
+
}
|
|
6880
|
+
return parseEnvContent(content);
|
|
6881
|
+
};
|
|
6602
6882
|
var saveEnvFileAsync = async ({
|
|
6603
6883
|
envPath,
|
|
6604
6884
|
data,
|
|
@@ -7120,8 +7400,9 @@ var TENANT_SELECTION_CODES = new Set([
|
|
|
7120
7400
|
// ../ixp-sdk/package.json
|
|
7121
7401
|
var package_default2 = {
|
|
7122
7402
|
name: "@uipath/ixp-sdk",
|
|
7403
|
+
author: "UiPath",
|
|
7123
7404
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
7124
|
-
version: "1.
|
|
7405
|
+
version: "1.203.0-preview.160",
|
|
7125
7406
|
description: "SDK for the UiPath IXP (Intelligent eXtraction Platform) API — projects, taxonomies, prompts, predictions, and model publishing.",
|
|
7126
7407
|
repository: {
|
|
7127
7408
|
type: "git",
|
|
@@ -7210,7 +7491,7 @@ function baseHeaders(config) {
|
|
|
7210
7491
|
if (config.userAgent) {
|
|
7211
7492
|
headers["User-Agent"] = config.userAgent;
|
|
7212
7493
|
}
|
|
7213
|
-
return headers;
|
|
7494
|
+
return addSdkCodingAgentHeader(headers);
|
|
7214
7495
|
}
|
|
7215
7496
|
var JSON_CONTENT_HEADERS = {
|
|
7216
7497
|
"Content-Type": "application/json",
|
|
@@ -9972,4 +10253,4 @@ var registerCommands = async (program2) => {
|
|
|
9972
10253
|
|
|
9973
10254
|
export { package_default, Command, metadata, registerCommands };
|
|
9974
10255
|
|
|
9975
|
-
//# debugId=
|
|
10256
|
+
//# debugId=AF1EFD93E35D1B6664756E2164756E21
|
package/dist/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/ixp-tool",
|
|
3
|
+
"author": "UiPath",
|
|
3
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
4
|
-
"version": "1.
|
|
5
|
+
"version": "1.203.0-preview.160",
|
|
5
6
|
"description": "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
|
|
6
7
|
"private": false,
|
|
7
8
|
"repository": {
|
|
@@ -26,5 +27,5 @@
|
|
|
26
27
|
"files": [
|
|
27
28
|
"dist"
|
|
28
29
|
],
|
|
29
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "3a42062ba731afca4595ba9aa8a80afc9667528d"
|
|
30
31
|
}
|