@uipath/resourcecatalog-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-c25x4h9p.js → tool-b0fje300.js} +286 -35
- 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/resourcecatalog-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: "CLI plugin for the UiPath Resource Catalog Service.",
|
|
2105
2106
|
private: false,
|
|
2106
2107
|
repository: {
|
|
@@ -2654,7 +2655,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
|
|
|
2654
2655
|
var EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
2655
2656
|
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
2656
2657
|
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
2657
|
-
var PADDED_BASE64_PATTERN = /[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
2658
|
+
var PADDED_BASE64_PATTERN = /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
2658
2659
|
var BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
|
|
2659
2660
|
var USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
|
|
2660
2661
|
var UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
|
|
@@ -2701,7 +2702,7 @@ var QUOTED_LITERAL_PATTERN = new RegExp([
|
|
|
2701
2702
|
`(?<![A-Za-z0-9])"(?:[^\\
|
|
2702
2703
|
]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
|
|
2703
2704
|
].join("|"), "g");
|
|
2704
|
-
var JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
|
|
2705
|
+
var JSON_BODY_PATTERN = /[{[][^{}[\]:,]*[:,][^{}[\]]*[\]}]/g;
|
|
2705
2706
|
var COLLAPSED_BODY = "{…}";
|
|
2706
2707
|
var COLLAPSED_BODY_MARKER = "\x01body\x01";
|
|
2707
2708
|
var MAX_BODY_NESTING = 8;
|
|
@@ -2716,10 +2717,13 @@ function collapseJsonBodies(text) {
|
|
|
2716
2717
|
}
|
|
2717
2718
|
return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
|
|
2718
2719
|
}
|
|
2719
|
-
var TRAILING_PROSE_PUNCT =
|
|
2720
|
+
var TRAILING_PROSE_PUNCT = `.,;:!?)]}>'"`;
|
|
2720
2721
|
function peelTrailingPunctuation(match) {
|
|
2721
|
-
|
|
2722
|
-
|
|
2722
|
+
let end = match.length;
|
|
2723
|
+
while (end > 0 && TRAILING_PROSE_PUNCT.includes(match[end - 1])) {
|
|
2724
|
+
end -= 1;
|
|
2725
|
+
}
|
|
2726
|
+
return [match.slice(0, end), match.slice(end)];
|
|
2723
2727
|
}
|
|
2724
2728
|
function redactUrl(raw) {
|
|
2725
2729
|
try {
|
|
@@ -3022,6 +3026,22 @@ function parseHttpStatusFromMessage(message) {
|
|
|
3022
3026
|
const status = Number(match[1]);
|
|
3023
3027
|
return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
3024
3028
|
}
|
|
3029
|
+
function findHttpStatusInGraph(error) {
|
|
3030
|
+
for (const node of walkErrorGraph(error)) {
|
|
3031
|
+
const response = node.response;
|
|
3032
|
+
const explicit = typeof node.status === "number" ? node.status : response?.status;
|
|
3033
|
+
if (typeof explicit === "number" && explicit >= 400 && explicit <= 599) {
|
|
3034
|
+
return explicit;
|
|
3035
|
+
}
|
|
3036
|
+
if (typeof node.message === "string") {
|
|
3037
|
+
const parsed = parseHttpStatusFromMessage(node.message);
|
|
3038
|
+
if (parsed !== undefined && parsed >= 400) {
|
|
3039
|
+
return parsed;
|
|
3040
|
+
}
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
return;
|
|
3044
|
+
}
|
|
3025
3045
|
function isHtmlDocument(body) {
|
|
3026
3046
|
return /^\s*(<!doctype html|<html\b)/i.test(body);
|
|
3027
3047
|
}
|
|
@@ -3135,7 +3155,8 @@ async function extractErrorDetails(error, options) {
|
|
|
3135
3155
|
}
|
|
3136
3156
|
let message;
|
|
3137
3157
|
let result = "Failure";
|
|
3138
|
-
const
|
|
3158
|
+
const classificationStatus = status ?? findHttpStatusInGraph(error);
|
|
3159
|
+
const classification = classifyError(classificationStatus, error);
|
|
3139
3160
|
let retry = classification.retry;
|
|
3140
3161
|
if (status === 401) {
|
|
3141
3162
|
message = DEFAULT_401;
|
|
@@ -3211,8 +3232,8 @@ async function extractErrorDetails(error, options) {
|
|
|
3211
3232
|
details = describeThrownValue(error);
|
|
3212
3233
|
}
|
|
3213
3234
|
const context = {};
|
|
3214
|
-
if (
|
|
3215
|
-
context.httpStatus =
|
|
3235
|
+
if (classificationStatus) {
|
|
3236
|
+
context.httpStatus = classificationStatus;
|
|
3216
3237
|
}
|
|
3217
3238
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
3218
3239
|
context.errorCode = parsedBody.errorCode;
|
|
@@ -3774,7 +3795,8 @@ function readRegistryValue(keyPath, valueName) {
|
|
|
3774
3795
|
}
|
|
3775
3796
|
const [error, output] = catchError(() => execFileSync("reg", ["query", keyPath, "/v", valueName], {
|
|
3776
3797
|
encoding: "utf-8",
|
|
3777
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
3798
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
3799
|
+
windowsHide: true
|
|
3778
3800
|
}));
|
|
3779
3801
|
if (error) {
|
|
3780
3802
|
return "";
|
|
@@ -4456,28 +4478,32 @@ function isPlainRecord(value) {
|
|
|
4456
4478
|
const prototype = Object.getPrototypeOf(value);
|
|
4457
4479
|
return prototype === Object.prototype || prototype === null;
|
|
4458
4480
|
}
|
|
4459
|
-
function
|
|
4481
|
+
function splitPagedEnvelope(value) {
|
|
4460
4482
|
if (Array.isArray(value) || !isPlainRecord(value))
|
|
4461
4483
|
return null;
|
|
4462
|
-
const entries = Object.
|
|
4484
|
+
const entries = Object.entries(value);
|
|
4463
4485
|
if (entries.length === 0)
|
|
4464
4486
|
return null;
|
|
4465
|
-
let
|
|
4466
|
-
|
|
4467
|
-
for (const entry of entries) {
|
|
4487
|
+
let found = null;
|
|
4488
|
+
const meta = Object.create(null);
|
|
4489
|
+
for (const [key, entry] of entries) {
|
|
4468
4490
|
if (Array.isArray(entry)) {
|
|
4469
|
-
if (
|
|
4491
|
+
if (found !== null)
|
|
4470
4492
|
return null;
|
|
4471
|
-
|
|
4493
|
+
found = { key, rows: entry };
|
|
4472
4494
|
} else if (entry !== null && typeof entry === "object") {
|
|
4473
4495
|
return null;
|
|
4474
4496
|
} else {
|
|
4475
|
-
|
|
4497
|
+
meta[key] = entry;
|
|
4476
4498
|
}
|
|
4477
4499
|
}
|
|
4478
|
-
if (
|
|
4500
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
4479
4501
|
return null;
|
|
4480
|
-
return
|
|
4502
|
+
return { ...found, meta };
|
|
4503
|
+
}
|
|
4504
|
+
function extractPagedRows(value) {
|
|
4505
|
+
const paged = splitPagedEnvelope(value);
|
|
4506
|
+
return paged === null ? null : paged.rows;
|
|
4481
4507
|
}
|
|
4482
4508
|
function toLowerCamelCaseKey(key) {
|
|
4483
4509
|
if (!key)
|
|
@@ -4581,6 +4607,9 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
4581
4607
|
}
|
|
4582
4608
|
break;
|
|
4583
4609
|
}
|
|
4610
|
+
case "markdown":
|
|
4611
|
+
logFn(renderMarkdown(data));
|
|
4612
|
+
break;
|
|
4584
4613
|
default: {
|
|
4585
4614
|
const hasData = "Data" in data && data.Data != null;
|
|
4586
4615
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
@@ -4605,6 +4634,10 @@ function logOutput(data, format = "json", tableRowStyle) {
|
|
|
4605
4634
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
4606
4635
|
`), needsAsciiSafeJson(sink), styleFn);
|
|
4607
4636
|
}
|
|
4637
|
+
var PLUMBING_KEYS = new Set(["code", "log"]);
|
|
4638
|
+
function isPlumbingKey(key) {
|
|
4639
|
+
return PLUMBING_KEYS.has(key.toLowerCase());
|
|
4640
|
+
}
|
|
4608
4641
|
function cellToString(val) {
|
|
4609
4642
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
4610
4643
|
}
|
|
@@ -4620,7 +4653,7 @@ function wrapText(text, width) {
|
|
|
4620
4653
|
function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
4621
4654
|
if (data.length === 0)
|
|
4622
4655
|
return;
|
|
4623
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
4656
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
4624
4657
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
|
|
4625
4658
|
const header = keys.map((key, i) => key.padEnd(maxWidths[i])).join(" | ");
|
|
4626
4659
|
logFn(header);
|
|
@@ -4642,7 +4675,7 @@ function isNonEmptyPlainObject(value) {
|
|
|
4642
4675
|
}
|
|
4643
4676
|
var NESTED_INDENT = " ";
|
|
4644
4677
|
function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
4645
|
-
const keys = Object.keys(data).filter((key) => !
|
|
4678
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey(key));
|
|
4646
4679
|
if (keys.length === 0)
|
|
4647
4680
|
return;
|
|
4648
4681
|
const isBlockValue = (value) => isPlainObjectArray(value) || isNonEmptyPlainObject(value);
|
|
@@ -4673,7 +4706,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
|
4673
4706
|
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
4674
4707
|
if (data.length === 0)
|
|
4675
4708
|
return;
|
|
4676
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
4709
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
4677
4710
|
if (keys.length === 0)
|
|
4678
4711
|
return;
|
|
4679
4712
|
if (!process.stdout.isTTY) {
|
|
@@ -4747,6 +4780,220 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
4747
4780
|
logFn(`Log: ${externalLogValue}`);
|
|
4748
4781
|
}
|
|
4749
4782
|
}
|
|
4783
|
+
var MARKDOWN_MAX_CELL = 200;
|
|
4784
|
+
var MARKDOWN_MAX_DEPTH = 3;
|
|
4785
|
+
function markdownHeading(depth) {
|
|
4786
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
4787
|
+
}
|
|
4788
|
+
var BACKTICK_RUN = /`+/g;
|
|
4789
|
+
function fencedBlock(text) {
|
|
4790
|
+
const first = text.trimStart()[0];
|
|
4791
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
4792
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN), (match) => match[0].length));
|
|
4793
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
4794
|
+
return `${fence}${language}
|
|
4795
|
+
${text}
|
|
4796
|
+
${fence}`;
|
|
4797
|
+
}
|
|
4798
|
+
function collapseNewlineRuns(text) {
|
|
4799
|
+
return text.split(/(\s+)/).map((part, index) => index % 2 === 1 && part.includes(`
|
|
4800
|
+
`) ? " " : part).join("");
|
|
4801
|
+
}
|
|
4802
|
+
function markdownCell(value) {
|
|
4803
|
+
const text = value instanceof Date ? value.toISOString() : cellToString(value);
|
|
4804
|
+
return collapseNewlineRuns(text).replace(/\|/g, "\\|");
|
|
4805
|
+
}
|
|
4806
|
+
function markdownLabel(key) {
|
|
4807
|
+
return collapseNewlineRuns(key).replace(/[\\`*|]/g, "\\$&");
|
|
4808
|
+
}
|
|
4809
|
+
function withoutPlumbing(record) {
|
|
4810
|
+
const kept = Object.create(null);
|
|
4811
|
+
for (const [key, value] of Object.entries(record)) {
|
|
4812
|
+
if (!isPlumbingKey(key))
|
|
4813
|
+
kept[key] = value;
|
|
4814
|
+
}
|
|
4815
|
+
return kept;
|
|
4816
|
+
}
|
|
4817
|
+
function rowsWithoutPlumbing(rows) {
|
|
4818
|
+
return rows.map((row) => isPlainRecord(row) ? withoutPlumbing(row) : row);
|
|
4819
|
+
}
|
|
4820
|
+
function markdownTable(rows) {
|
|
4821
|
+
const columns = [];
|
|
4822
|
+
const seen = new Set;
|
|
4823
|
+
for (const row of rows) {
|
|
4824
|
+
for (const key of Object.keys(row)) {
|
|
4825
|
+
if (!seen.has(key)) {
|
|
4826
|
+
seen.add(key);
|
|
4827
|
+
columns.push(key);
|
|
4828
|
+
}
|
|
4829
|
+
}
|
|
4830
|
+
}
|
|
4831
|
+
if (columns.length === 0)
|
|
4832
|
+
return null;
|
|
4833
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell(row[key])));
|
|
4834
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL))) {
|
|
4835
|
+
return null;
|
|
4836
|
+
}
|
|
4837
|
+
return [
|
|
4838
|
+
`| ${columns.map(markdownLabel).join(" | ")} |`,
|
|
4839
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
4840
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
4841
|
+
].join(`
|
|
4842
|
+
`);
|
|
4843
|
+
}
|
|
4844
|
+
function extractMessageSequence(rows) {
|
|
4845
|
+
const messages = [];
|
|
4846
|
+
for (const row of rows) {
|
|
4847
|
+
const message = extractSingleMessage(row);
|
|
4848
|
+
if (message === null)
|
|
4849
|
+
return null;
|
|
4850
|
+
messages.push(message);
|
|
4851
|
+
}
|
|
4852
|
+
return messages.join(`
|
|
4853
|
+
|
|
4854
|
+
`);
|
|
4855
|
+
}
|
|
4856
|
+
function markdownRows(rows, depth) {
|
|
4857
|
+
if (rows.length === 0)
|
|
4858
|
+
return "(none)";
|
|
4859
|
+
if (!isPlainObjectArray(rows)) {
|
|
4860
|
+
return rows.map((item) => `- ${markdownCell(item)}`).join(`
|
|
4861
|
+
`);
|
|
4862
|
+
}
|
|
4863
|
+
const prose = extractMessageSequence(rows);
|
|
4864
|
+
if (prose !== null)
|
|
4865
|
+
return prose;
|
|
4866
|
+
const table = markdownTable(rows);
|
|
4867
|
+
if (table !== null)
|
|
4868
|
+
return table;
|
|
4869
|
+
if (depth >= MARKDOWN_MAX_DEPTH) {
|
|
4870
|
+
return fencedBlock(JSON.stringify(rows, null, 2));
|
|
4871
|
+
}
|
|
4872
|
+
return rows.map((row, index) => [
|
|
4873
|
+
`${markdownHeading(depth)} ${index + 1}`,
|
|
4874
|
+
markdownObject(row, depth + 1)
|
|
4875
|
+
].join(`
|
|
4876
|
+
|
|
4877
|
+
`)).join(`
|
|
4878
|
+
|
|
4879
|
+
`);
|
|
4880
|
+
}
|
|
4881
|
+
function markdownObject(obj, depth) {
|
|
4882
|
+
const scalars = [];
|
|
4883
|
+
const blocks = [];
|
|
4884
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
4885
|
+
if (value === undefined)
|
|
4886
|
+
continue;
|
|
4887
|
+
const label = markdownLabel(key);
|
|
4888
|
+
if (Array.isArray(value)) {
|
|
4889
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
4890
|
+
|
|
4891
|
+
${markdownRows(value, depth + 1)}`);
|
|
4892
|
+
} else if (isNonEmptyPlainObject(value)) {
|
|
4893
|
+
const nested = depth < MARKDOWN_MAX_DEPTH ? markdownObject(value, depth + 1) : fencedBlock(JSON.stringify(value, null, 2));
|
|
4894
|
+
if (nested !== "") {
|
|
4895
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
4896
|
+
|
|
4897
|
+
${nested}`);
|
|
4898
|
+
}
|
|
4899
|
+
} else if (typeof value === "string" && value.includes(`
|
|
4900
|
+
`)) {
|
|
4901
|
+
blocks.push(`**${label}:**
|
|
4902
|
+
|
|
4903
|
+
${fencedBlock(value)}`);
|
|
4904
|
+
} else {
|
|
4905
|
+
scalars.push(`**${label}:** ${markdownCell(value)}`);
|
|
4906
|
+
}
|
|
4907
|
+
}
|
|
4908
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
4909
|
+
`)] : [];
|
|
4910
|
+
sections.push(...blocks);
|
|
4911
|
+
return sections.join(`
|
|
4912
|
+
|
|
4913
|
+
`);
|
|
4914
|
+
}
|
|
4915
|
+
function extractSingleMessage(payload) {
|
|
4916
|
+
if (!isPlainRecord(payload))
|
|
4917
|
+
return null;
|
|
4918
|
+
const keys = Object.keys(payload);
|
|
4919
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
4920
|
+
return null;
|
|
4921
|
+
const value = payload[keys[0]];
|
|
4922
|
+
return typeof value === "string" ? value : null;
|
|
4923
|
+
}
|
|
4924
|
+
function markdownPayload(payload) {
|
|
4925
|
+
const message = extractSingleMessage(payload);
|
|
4926
|
+
if (message !== null)
|
|
4927
|
+
return message;
|
|
4928
|
+
if (Array.isArray(payload)) {
|
|
4929
|
+
return markdownRows(rowsWithoutPlumbing(payload), 0);
|
|
4930
|
+
}
|
|
4931
|
+
const visible = withoutPlumbing(payload);
|
|
4932
|
+
const paged = splitPagedEnvelope(visible);
|
|
4933
|
+
if (paged !== null) {
|
|
4934
|
+
const meta = markdownObject(paged.meta, 0);
|
|
4935
|
+
const rows = `${markdownHeading(0)} ${markdownLabel(paged.key)}
|
|
4936
|
+
|
|
4937
|
+
${markdownRows(rowsWithoutPlumbing(paged.rows), 1)}`;
|
|
4938
|
+
return meta === "" ? rows : `${meta}
|
|
4939
|
+
|
|
4940
|
+
${rows}`;
|
|
4941
|
+
}
|
|
4942
|
+
return markdownObject(visible, 0);
|
|
4943
|
+
}
|
|
4944
|
+
function isPaginationWorthShowing(value) {
|
|
4945
|
+
if (typeof value !== "object" || value === null)
|
|
4946
|
+
return false;
|
|
4947
|
+
const page = value;
|
|
4948
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
4949
|
+
}
|
|
4950
|
+
function markdownEnvelopeNotes(data) {
|
|
4951
|
+
const envelope = data;
|
|
4952
|
+
const notes = [];
|
|
4953
|
+
const warning = envelope.Warning;
|
|
4954
|
+
if (typeof warning === "string" && warning !== "") {
|
|
4955
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
4956
|
+
}
|
|
4957
|
+
const instructions = envelope.Instructions;
|
|
4958
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
4959
|
+
notes.push(`> ${instructions}`);
|
|
4960
|
+
}
|
|
4961
|
+
const pagination = envelope.Pagination;
|
|
4962
|
+
if (isPaginationWorthShowing(pagination)) {
|
|
4963
|
+
const body = markdownObject(pagination, 1);
|
|
4964
|
+
if (body !== "") {
|
|
4965
|
+
notes.push(`${markdownHeading(0)} Pagination
|
|
4966
|
+
|
|
4967
|
+
${body}`);
|
|
4968
|
+
}
|
|
4969
|
+
}
|
|
4970
|
+
const log = envelope.Log;
|
|
4971
|
+
if (typeof log === "string" && log !== "") {
|
|
4972
|
+
notes.push(`**Log:** ${log}`);
|
|
4973
|
+
}
|
|
4974
|
+
return notes;
|
|
4975
|
+
}
|
|
4976
|
+
function renderMarkdown(data) {
|
|
4977
|
+
if (data.Result !== RESULTS.Success) {
|
|
4978
|
+
const failure = data;
|
|
4979
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
4980
|
+
if (failure.Data != null) {
|
|
4981
|
+
sections.push(markdownPayload(failure.Data));
|
|
4982
|
+
}
|
|
4983
|
+
if (failure.Instructions) {
|
|
4984
|
+
sections.push(`> ${failure.Instructions}`);
|
|
4985
|
+
}
|
|
4986
|
+
return sections.filter((section) => section !== "").join(`
|
|
4987
|
+
|
|
4988
|
+
`);
|
|
4989
|
+
}
|
|
4990
|
+
if (!("Data" in data) || data.Data == null) {
|
|
4991
|
+
return markdownObject(withoutPlumbing(data), 0);
|
|
4992
|
+
}
|
|
4993
|
+
return [markdownPayload(data.Data), ...markdownEnvelopeNotes(data)].filter((section) => section !== "").join(`
|
|
4994
|
+
|
|
4995
|
+
`);
|
|
4996
|
+
}
|
|
4750
4997
|
function toYaml(data) {
|
|
4751
4998
|
const codec = getYamlCodec();
|
|
4752
4999
|
if (!codec) {
|
|
@@ -6057,8 +6304,9 @@ class VoidApiResponse {
|
|
|
6057
6304
|
// ../resourcecatalog-sdk/package.json
|
|
6058
6305
|
var package_default2 = {
|
|
6059
6306
|
name: "@uipath/resourcecatalog-sdk",
|
|
6307
|
+
author: "UiPath",
|
|
6060
6308
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
6061
|
-
version: "1.
|
|
6309
|
+
version: "1.203.0",
|
|
6062
6310
|
description: "SDK for the UiPath Resource Catalog Service API.",
|
|
6063
6311
|
repository: {
|
|
6064
6312
|
type: "git",
|
|
@@ -8213,16 +8461,7 @@ var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) =
|
|
|
8213
8461
|
errorMessage: location.source === "absolute" ? `Environment file not found: ${envFilePath}` : `Unable to locate environment file: ${envFilePath}. Run 'uip login' to authenticate.`
|
|
8214
8462
|
};
|
|
8215
8463
|
};
|
|
8216
|
-
var
|
|
8217
|
-
const fs2 = getFileSystem();
|
|
8218
|
-
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
8219
|
-
if (!await fs2.exists(absolutePath)) {
|
|
8220
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
8221
|
-
}
|
|
8222
|
-
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
8223
|
-
if (content === null) {
|
|
8224
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
8225
|
-
}
|
|
8464
|
+
var parseEnvContent = (content) => {
|
|
8226
8465
|
const env = {};
|
|
8227
8466
|
for (const line of content.split(`
|
|
8228
8467
|
`)) {
|
|
@@ -8243,6 +8482,18 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
8243
8482
|
}
|
|
8244
8483
|
return env;
|
|
8245
8484
|
};
|
|
8485
|
+
var loadEnvFileAsync = async ({ envPath }) => {
|
|
8486
|
+
const fs2 = getFileSystem();
|
|
8487
|
+
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
8488
|
+
if (!await fs2.exists(absolutePath)) {
|
|
8489
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
8490
|
+
}
|
|
8491
|
+
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
8492
|
+
if (content === null) {
|
|
8493
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
8494
|
+
}
|
|
8495
|
+
return parseEnvContent(content);
|
|
8496
|
+
};
|
|
8246
8497
|
var saveEnvFileAsync = async ({
|
|
8247
8498
|
envPath,
|
|
8248
8499
|
data,
|
|
@@ -9026,4 +9277,4 @@ var registerCommands = async (program2) => {
|
|
|
9026
9277
|
|
|
9027
9278
|
export { Command, metadata, registerCommands };
|
|
9028
9279
|
|
|
9029
|
-
//# debugId=
|
|
9280
|
+
//# debugId=090A8C0FC05A3DD564756E2164756E21
|
package/dist/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/resourcecatalog-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": "CLI plugin for the UiPath Resource Catalog Service.",
|
|
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
|
}
|