@uipath/platform-tool 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 +8 -10
- package/dist/index.js +1 -1
- package/dist/{tool-03f4ek8a.js → tool-rtjc222t.js} +286 -35
- package/dist/tool.js +1 -1
- package/package.json +3 -2
|
@@ -29,23 +29,21 @@ those licences require.
|
|
|
29
29
|
|
|
30
30
|
## @uipath/license.accountant.typescript.client@1.2.0-dev.12
|
|
31
31
|
|
|
32
|
-
SPDX:
|
|
32
|
+
SPDX:
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
internal IP policy, and is listed here because it is bundled.
|
|
34
|
+
The upstream package ships no licence file here; `` is the
|
|
35
|
+
licence it is distributed under. The canonical text of that licence
|
|
36
|
+
applies, with copyright held by the package's authors.
|
|
38
37
|
|
|
39
38
|
---
|
|
40
39
|
|
|
41
40
|
## @uipath/license.resource.manager.typescript.client@1.2.1-dev.15
|
|
42
41
|
|
|
43
|
-
SPDX:
|
|
42
|
+
SPDX:
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
internal IP policy, and is listed here because it is bundled.
|
|
44
|
+
The upstream package ships no licence file here; `` is the
|
|
45
|
+
licence it is distributed under. The canonical text of that licence
|
|
46
|
+
applies, with copyright held by the package's authors.
|
|
49
47
|
|
|
50
48
|
---
|
|
51
49
|
|
package/dist/index.js
CHANGED
|
@@ -27335,8 +27335,9 @@ var require_dist2 = __commonJS(function(exports) {
|
|
|
27335
27335
|
// package.json
|
|
27336
27336
|
var package_default = {
|
|
27337
27337
|
name: "@uipath/platform-tool",
|
|
27338
|
+
author: "UiPath",
|
|
27338
27339
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
27339
|
-
version: "1.
|
|
27340
|
+
version: "1.203.0-preview.180",
|
|
27340
27341
|
description: "Manage UiPath platform-level resources such as tenant licensing.",
|
|
27341
27342
|
publishConfig: {
|
|
27342
27343
|
registry: "https://npm.pkg.github.com/"
|
|
@@ -28374,16 +28375,7 @@ var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) =
|
|
|
28374
28375
|
errorMessage: location.source === "absolute" ? `Environment file not found: ${envFilePath}` : `Unable to locate environment file: ${envFilePath}. Run 'uip login' to authenticate.`
|
|
28375
28376
|
};
|
|
28376
28377
|
};
|
|
28377
|
-
var
|
|
28378
|
-
const fs2 = getFileSystem();
|
|
28379
|
-
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
28380
|
-
if (!await fs2.exists(absolutePath)) {
|
|
28381
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
28382
|
-
}
|
|
28383
|
-
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
28384
|
-
if (content === null) {
|
|
28385
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
28386
|
-
}
|
|
28378
|
+
var parseEnvContent = (content) => {
|
|
28387
28379
|
const env = {};
|
|
28388
28380
|
for (const line of content.split(`
|
|
28389
28381
|
`)) {
|
|
@@ -28404,6 +28396,18 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
28404
28396
|
}
|
|
28405
28397
|
return env;
|
|
28406
28398
|
};
|
|
28399
|
+
var loadEnvFileAsync = async ({ envPath }) => {
|
|
28400
|
+
const fs2 = getFileSystem();
|
|
28401
|
+
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
28402
|
+
if (!await fs2.exists(absolutePath)) {
|
|
28403
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
28404
|
+
}
|
|
28405
|
+
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
28406
|
+
if (content === null) {
|
|
28407
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
28408
|
+
}
|
|
28409
|
+
return parseEnvContent(content);
|
|
28410
|
+
};
|
|
28407
28411
|
var saveEnvFileAsync = async ({
|
|
28408
28412
|
envPath,
|
|
28409
28413
|
data,
|
|
@@ -29266,7 +29270,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
|
|
|
29266
29270
|
var EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
29267
29271
|
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
29268
29272
|
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
29269
|
-
var PADDED_BASE64_PATTERN = /[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
29273
|
+
var PADDED_BASE64_PATTERN = /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
29270
29274
|
var BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
|
|
29271
29275
|
var USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
|
|
29272
29276
|
var UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
|
|
@@ -29313,7 +29317,7 @@ var QUOTED_LITERAL_PATTERN = new RegExp([
|
|
|
29313
29317
|
`(?<![A-Za-z0-9])"(?:[^\\
|
|
29314
29318
|
]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
|
|
29315
29319
|
].join("|"), "g");
|
|
29316
|
-
var JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
|
|
29320
|
+
var JSON_BODY_PATTERN = /[{[][^{}[\]:,]*[:,][^{}[\]]*[\]}]/g;
|
|
29317
29321
|
var COLLAPSED_BODY = "{…}";
|
|
29318
29322
|
var COLLAPSED_BODY_MARKER = "\x01body\x01";
|
|
29319
29323
|
var MAX_BODY_NESTING = 8;
|
|
@@ -29328,10 +29332,13 @@ function collapseJsonBodies(text) {
|
|
|
29328
29332
|
}
|
|
29329
29333
|
return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
|
|
29330
29334
|
}
|
|
29331
|
-
var TRAILING_PROSE_PUNCT =
|
|
29335
|
+
var TRAILING_PROSE_PUNCT = `.,;:!?)]}>'"`;
|
|
29332
29336
|
function peelTrailingPunctuation(match) {
|
|
29333
|
-
|
|
29334
|
-
|
|
29337
|
+
let end = match.length;
|
|
29338
|
+
while (end > 0 && TRAILING_PROSE_PUNCT.includes(match[end - 1])) {
|
|
29339
|
+
end -= 1;
|
|
29340
|
+
}
|
|
29341
|
+
return [match.slice(0, end), match.slice(end)];
|
|
29335
29342
|
}
|
|
29336
29343
|
function redactUrl(raw) {
|
|
29337
29344
|
try {
|
|
@@ -29634,6 +29641,22 @@ function parseHttpStatusFromMessage(message) {
|
|
|
29634
29641
|
const status = Number(match[1]);
|
|
29635
29642
|
return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
29636
29643
|
}
|
|
29644
|
+
function findHttpStatusInGraph(error) {
|
|
29645
|
+
for (const node of walkErrorGraph(error)) {
|
|
29646
|
+
const response = node.response;
|
|
29647
|
+
const explicit = typeof node.status === "number" ? node.status : response?.status;
|
|
29648
|
+
if (typeof explicit === "number" && explicit >= 400 && explicit <= 599) {
|
|
29649
|
+
return explicit;
|
|
29650
|
+
}
|
|
29651
|
+
if (typeof node.message === "string") {
|
|
29652
|
+
const parsed = parseHttpStatusFromMessage(node.message);
|
|
29653
|
+
if (parsed !== undefined && parsed >= 400) {
|
|
29654
|
+
return parsed;
|
|
29655
|
+
}
|
|
29656
|
+
}
|
|
29657
|
+
}
|
|
29658
|
+
return;
|
|
29659
|
+
}
|
|
29637
29660
|
function isHtmlDocument(body) {
|
|
29638
29661
|
return /^\s*(<!doctype html|<html\b)/i.test(body);
|
|
29639
29662
|
}
|
|
@@ -29747,7 +29770,8 @@ async function extractErrorDetails(error, options) {
|
|
|
29747
29770
|
}
|
|
29748
29771
|
let message;
|
|
29749
29772
|
let result = "Failure";
|
|
29750
|
-
const
|
|
29773
|
+
const classificationStatus = status ?? findHttpStatusInGraph(error);
|
|
29774
|
+
const classification = classifyError(classificationStatus, error);
|
|
29751
29775
|
let retry = classification.retry;
|
|
29752
29776
|
if (status === 401) {
|
|
29753
29777
|
message = DEFAULT_401;
|
|
@@ -29823,8 +29847,8 @@ async function extractErrorDetails(error, options) {
|
|
|
29823
29847
|
details = describeThrownValue(error);
|
|
29824
29848
|
}
|
|
29825
29849
|
const context = {};
|
|
29826
|
-
if (
|
|
29827
|
-
context.httpStatus =
|
|
29850
|
+
if (classificationStatus) {
|
|
29851
|
+
context.httpStatus = classificationStatus;
|
|
29828
29852
|
}
|
|
29829
29853
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
29830
29854
|
context.errorCode = parsedBody.errorCode;
|
|
@@ -30386,7 +30410,8 @@ function readRegistryValue(keyPath, valueName) {
|
|
|
30386
30410
|
}
|
|
30387
30411
|
const [error, output] = catchError2(() => execFileSync("reg", ["query", keyPath, "/v", valueName], {
|
|
30388
30412
|
encoding: "utf-8",
|
|
30389
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
30413
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
30414
|
+
windowsHide: true
|
|
30390
30415
|
}));
|
|
30391
30416
|
if (error) {
|
|
30392
30417
|
return "";
|
|
@@ -31101,28 +31126,32 @@ function isPlainRecord(value) {
|
|
|
31101
31126
|
const prototype = Object.getPrototypeOf(value);
|
|
31102
31127
|
return prototype === Object.prototype || prototype === null;
|
|
31103
31128
|
}
|
|
31104
|
-
function
|
|
31129
|
+
function splitPagedEnvelope(value) {
|
|
31105
31130
|
if (Array.isArray(value) || !isPlainRecord(value))
|
|
31106
31131
|
return null;
|
|
31107
|
-
const entries = Object.
|
|
31132
|
+
const entries = Object.entries(value);
|
|
31108
31133
|
if (entries.length === 0)
|
|
31109
31134
|
return null;
|
|
31110
|
-
let
|
|
31111
|
-
|
|
31112
|
-
for (const entry of entries) {
|
|
31135
|
+
let found = null;
|
|
31136
|
+
const meta = Object.create(null);
|
|
31137
|
+
for (const [key, entry] of entries) {
|
|
31113
31138
|
if (Array.isArray(entry)) {
|
|
31114
|
-
if (
|
|
31139
|
+
if (found !== null)
|
|
31115
31140
|
return null;
|
|
31116
|
-
|
|
31141
|
+
found = { key, rows: entry };
|
|
31117
31142
|
} else if (entry !== null && typeof entry === "object") {
|
|
31118
31143
|
return null;
|
|
31119
31144
|
} else {
|
|
31120
|
-
|
|
31145
|
+
meta[key] = entry;
|
|
31121
31146
|
}
|
|
31122
31147
|
}
|
|
31123
|
-
if (
|
|
31148
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
31124
31149
|
return null;
|
|
31125
|
-
return
|
|
31150
|
+
return { ...found, meta };
|
|
31151
|
+
}
|
|
31152
|
+
function extractPagedRows(value) {
|
|
31153
|
+
const paged = splitPagedEnvelope(value);
|
|
31154
|
+
return paged === null ? null : paged.rows;
|
|
31126
31155
|
}
|
|
31127
31156
|
function toLowerCamelCaseKey(key) {
|
|
31128
31157
|
if (!key)
|
|
@@ -31226,6 +31255,9 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
31226
31255
|
}
|
|
31227
31256
|
break;
|
|
31228
31257
|
}
|
|
31258
|
+
case "markdown":
|
|
31259
|
+
logFn(renderMarkdown(data));
|
|
31260
|
+
break;
|
|
31229
31261
|
default: {
|
|
31230
31262
|
const hasData = "Data" in data && data.Data != null;
|
|
31231
31263
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
@@ -31250,6 +31282,10 @@ function logOutput(data, format = "json", tableRowStyle) {
|
|
|
31250
31282
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
31251
31283
|
`), needsAsciiSafeJson(sink), styleFn);
|
|
31252
31284
|
}
|
|
31285
|
+
var PLUMBING_KEYS = new Set(["code", "log"]);
|
|
31286
|
+
function isPlumbingKey(key) {
|
|
31287
|
+
return PLUMBING_KEYS.has(key.toLowerCase());
|
|
31288
|
+
}
|
|
31253
31289
|
function cellToString(val) {
|
|
31254
31290
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
31255
31291
|
}
|
|
@@ -31265,7 +31301,7 @@ function wrapText(text, width) {
|
|
|
31265
31301
|
function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
31266
31302
|
if (data.length === 0)
|
|
31267
31303
|
return;
|
|
31268
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
31304
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
31269
31305
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
|
|
31270
31306
|
const header = keys.map((key, i) => key.padEnd(maxWidths[i])).join(" | ");
|
|
31271
31307
|
logFn(header);
|
|
@@ -31287,7 +31323,7 @@ function isNonEmptyPlainObject(value) {
|
|
|
31287
31323
|
}
|
|
31288
31324
|
var NESTED_INDENT = " ";
|
|
31289
31325
|
function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
31290
|
-
const keys = Object.keys(data).filter((key) => !
|
|
31326
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey(key));
|
|
31291
31327
|
if (keys.length === 0)
|
|
31292
31328
|
return;
|
|
31293
31329
|
const isBlockValue = (value) => isPlainObjectArray(value) || isNonEmptyPlainObject(value);
|
|
@@ -31318,7 +31354,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
|
31318
31354
|
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
31319
31355
|
if (data.length === 0)
|
|
31320
31356
|
return;
|
|
31321
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
31357
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
31322
31358
|
if (keys.length === 0)
|
|
31323
31359
|
return;
|
|
31324
31360
|
if (!process.stdout.isTTY) {
|
|
@@ -31392,6 +31428,220 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
31392
31428
|
logFn(`Log: ${externalLogValue}`);
|
|
31393
31429
|
}
|
|
31394
31430
|
}
|
|
31431
|
+
var MARKDOWN_MAX_CELL = 200;
|
|
31432
|
+
var MARKDOWN_MAX_DEPTH = 3;
|
|
31433
|
+
function markdownHeading(depth) {
|
|
31434
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
31435
|
+
}
|
|
31436
|
+
var BACKTICK_RUN = /`+/g;
|
|
31437
|
+
function fencedBlock(text) {
|
|
31438
|
+
const first = text.trimStart()[0];
|
|
31439
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
31440
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN), (match) => match[0].length));
|
|
31441
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
31442
|
+
return `${fence}${language}
|
|
31443
|
+
${text}
|
|
31444
|
+
${fence}`;
|
|
31445
|
+
}
|
|
31446
|
+
function collapseNewlineRuns(text) {
|
|
31447
|
+
return text.split(/(\s+)/).map((part, index) => index % 2 === 1 && part.includes(`
|
|
31448
|
+
`) ? " " : part).join("");
|
|
31449
|
+
}
|
|
31450
|
+
function markdownCell(value) {
|
|
31451
|
+
const text = value instanceof Date ? value.toISOString() : cellToString(value);
|
|
31452
|
+
return collapseNewlineRuns(text).replace(/\|/g, "\\|");
|
|
31453
|
+
}
|
|
31454
|
+
function markdownLabel(key) {
|
|
31455
|
+
return collapseNewlineRuns(key).replace(/[\\`*|]/g, "\\$&");
|
|
31456
|
+
}
|
|
31457
|
+
function withoutPlumbing(record) {
|
|
31458
|
+
const kept = Object.create(null);
|
|
31459
|
+
for (const [key, value] of Object.entries(record)) {
|
|
31460
|
+
if (!isPlumbingKey(key))
|
|
31461
|
+
kept[key] = value;
|
|
31462
|
+
}
|
|
31463
|
+
return kept;
|
|
31464
|
+
}
|
|
31465
|
+
function rowsWithoutPlumbing(rows) {
|
|
31466
|
+
return rows.map((row) => isPlainRecord(row) ? withoutPlumbing(row) : row);
|
|
31467
|
+
}
|
|
31468
|
+
function markdownTable(rows) {
|
|
31469
|
+
const columns = [];
|
|
31470
|
+
const seen = new Set;
|
|
31471
|
+
for (const row of rows) {
|
|
31472
|
+
for (const key of Object.keys(row)) {
|
|
31473
|
+
if (!seen.has(key)) {
|
|
31474
|
+
seen.add(key);
|
|
31475
|
+
columns.push(key);
|
|
31476
|
+
}
|
|
31477
|
+
}
|
|
31478
|
+
}
|
|
31479
|
+
if (columns.length === 0)
|
|
31480
|
+
return null;
|
|
31481
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell(row[key])));
|
|
31482
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL))) {
|
|
31483
|
+
return null;
|
|
31484
|
+
}
|
|
31485
|
+
return [
|
|
31486
|
+
`| ${columns.map(markdownLabel).join(" | ")} |`,
|
|
31487
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
31488
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
31489
|
+
].join(`
|
|
31490
|
+
`);
|
|
31491
|
+
}
|
|
31492
|
+
function extractMessageSequence(rows) {
|
|
31493
|
+
const messages = [];
|
|
31494
|
+
for (const row of rows) {
|
|
31495
|
+
const message = extractSingleMessage(row);
|
|
31496
|
+
if (message === null)
|
|
31497
|
+
return null;
|
|
31498
|
+
messages.push(message);
|
|
31499
|
+
}
|
|
31500
|
+
return messages.join(`
|
|
31501
|
+
|
|
31502
|
+
`);
|
|
31503
|
+
}
|
|
31504
|
+
function markdownRows(rows, depth) {
|
|
31505
|
+
if (rows.length === 0)
|
|
31506
|
+
return "(none)";
|
|
31507
|
+
if (!isPlainObjectArray(rows)) {
|
|
31508
|
+
return rows.map((item) => `- ${markdownCell(item)}`).join(`
|
|
31509
|
+
`);
|
|
31510
|
+
}
|
|
31511
|
+
const prose = extractMessageSequence(rows);
|
|
31512
|
+
if (prose !== null)
|
|
31513
|
+
return prose;
|
|
31514
|
+
const table = markdownTable(rows);
|
|
31515
|
+
if (table !== null)
|
|
31516
|
+
return table;
|
|
31517
|
+
if (depth >= MARKDOWN_MAX_DEPTH) {
|
|
31518
|
+
return fencedBlock(JSON.stringify(rows, null, 2));
|
|
31519
|
+
}
|
|
31520
|
+
return rows.map((row, index) => [
|
|
31521
|
+
`${markdownHeading(depth)} ${index + 1}`,
|
|
31522
|
+
markdownObject(row, depth + 1)
|
|
31523
|
+
].join(`
|
|
31524
|
+
|
|
31525
|
+
`)).join(`
|
|
31526
|
+
|
|
31527
|
+
`);
|
|
31528
|
+
}
|
|
31529
|
+
function markdownObject(obj, depth) {
|
|
31530
|
+
const scalars = [];
|
|
31531
|
+
const blocks = [];
|
|
31532
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
31533
|
+
if (value === undefined)
|
|
31534
|
+
continue;
|
|
31535
|
+
const label = markdownLabel(key);
|
|
31536
|
+
if (Array.isArray(value)) {
|
|
31537
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
31538
|
+
|
|
31539
|
+
${markdownRows(value, depth + 1)}`);
|
|
31540
|
+
} else if (isNonEmptyPlainObject(value)) {
|
|
31541
|
+
const nested = depth < MARKDOWN_MAX_DEPTH ? markdownObject(value, depth + 1) : fencedBlock(JSON.stringify(value, null, 2));
|
|
31542
|
+
if (nested !== "") {
|
|
31543
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
31544
|
+
|
|
31545
|
+
${nested}`);
|
|
31546
|
+
}
|
|
31547
|
+
} else if (typeof value === "string" && value.includes(`
|
|
31548
|
+
`)) {
|
|
31549
|
+
blocks.push(`**${label}:**
|
|
31550
|
+
|
|
31551
|
+
${fencedBlock(value)}`);
|
|
31552
|
+
} else {
|
|
31553
|
+
scalars.push(`**${label}:** ${markdownCell(value)}`);
|
|
31554
|
+
}
|
|
31555
|
+
}
|
|
31556
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
31557
|
+
`)] : [];
|
|
31558
|
+
sections.push(...blocks);
|
|
31559
|
+
return sections.join(`
|
|
31560
|
+
|
|
31561
|
+
`);
|
|
31562
|
+
}
|
|
31563
|
+
function extractSingleMessage(payload) {
|
|
31564
|
+
if (!isPlainRecord(payload))
|
|
31565
|
+
return null;
|
|
31566
|
+
const keys = Object.keys(payload);
|
|
31567
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
31568
|
+
return null;
|
|
31569
|
+
const value = payload[keys[0]];
|
|
31570
|
+
return typeof value === "string" ? value : null;
|
|
31571
|
+
}
|
|
31572
|
+
function markdownPayload(payload) {
|
|
31573
|
+
const message = extractSingleMessage(payload);
|
|
31574
|
+
if (message !== null)
|
|
31575
|
+
return message;
|
|
31576
|
+
if (Array.isArray(payload)) {
|
|
31577
|
+
return markdownRows(rowsWithoutPlumbing(payload), 0);
|
|
31578
|
+
}
|
|
31579
|
+
const visible = withoutPlumbing(payload);
|
|
31580
|
+
const paged = splitPagedEnvelope(visible);
|
|
31581
|
+
if (paged !== null) {
|
|
31582
|
+
const meta = markdownObject(paged.meta, 0);
|
|
31583
|
+
const rows = `${markdownHeading(0)} ${markdownLabel(paged.key)}
|
|
31584
|
+
|
|
31585
|
+
${markdownRows(rowsWithoutPlumbing(paged.rows), 1)}`;
|
|
31586
|
+
return meta === "" ? rows : `${meta}
|
|
31587
|
+
|
|
31588
|
+
${rows}`;
|
|
31589
|
+
}
|
|
31590
|
+
return markdownObject(visible, 0);
|
|
31591
|
+
}
|
|
31592
|
+
function isPaginationWorthShowing(value) {
|
|
31593
|
+
if (typeof value !== "object" || value === null)
|
|
31594
|
+
return false;
|
|
31595
|
+
const page = value;
|
|
31596
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
31597
|
+
}
|
|
31598
|
+
function markdownEnvelopeNotes(data) {
|
|
31599
|
+
const envelope = data;
|
|
31600
|
+
const notes = [];
|
|
31601
|
+
const warning = envelope.Warning;
|
|
31602
|
+
if (typeof warning === "string" && warning !== "") {
|
|
31603
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
31604
|
+
}
|
|
31605
|
+
const instructions = envelope.Instructions;
|
|
31606
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
31607
|
+
notes.push(`> ${instructions}`);
|
|
31608
|
+
}
|
|
31609
|
+
const pagination = envelope.Pagination;
|
|
31610
|
+
if (isPaginationWorthShowing(pagination)) {
|
|
31611
|
+
const body = markdownObject(pagination, 1);
|
|
31612
|
+
if (body !== "") {
|
|
31613
|
+
notes.push(`${markdownHeading(0)} Pagination
|
|
31614
|
+
|
|
31615
|
+
${body}`);
|
|
31616
|
+
}
|
|
31617
|
+
}
|
|
31618
|
+
const log = envelope.Log;
|
|
31619
|
+
if (typeof log === "string" && log !== "") {
|
|
31620
|
+
notes.push(`**Log:** ${log}`);
|
|
31621
|
+
}
|
|
31622
|
+
return notes;
|
|
31623
|
+
}
|
|
31624
|
+
function renderMarkdown(data) {
|
|
31625
|
+
if (data.Result !== RESULTS.Success) {
|
|
31626
|
+
const failure = data;
|
|
31627
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
31628
|
+
if (failure.Data != null) {
|
|
31629
|
+
sections.push(markdownPayload(failure.Data));
|
|
31630
|
+
}
|
|
31631
|
+
if (failure.Instructions) {
|
|
31632
|
+
sections.push(`> ${failure.Instructions}`);
|
|
31633
|
+
}
|
|
31634
|
+
return sections.filter((section) => section !== "").join(`
|
|
31635
|
+
|
|
31636
|
+
`);
|
|
31637
|
+
}
|
|
31638
|
+
if (!("Data" in data) || data.Data == null) {
|
|
31639
|
+
return markdownObject(withoutPlumbing(data), 0);
|
|
31640
|
+
}
|
|
31641
|
+
return [markdownPayload(data.Data), ...markdownEnvelopeNotes(data)].filter((section) => section !== "").join(`
|
|
31642
|
+
|
|
31643
|
+
`);
|
|
31644
|
+
}
|
|
31395
31645
|
function toYaml(data) {
|
|
31396
31646
|
const codec = getYamlCodec();
|
|
31397
31647
|
if (!codec) {
|
|
@@ -33747,8 +33997,9 @@ class JSONApiResponse {
|
|
|
33747
33997
|
// ../admin/identity-sdk/package.json
|
|
33748
33998
|
var package_default2 = {
|
|
33749
33999
|
name: "@uipath/identity-sdk",
|
|
34000
|
+
author: "UiPath",
|
|
33750
34001
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
33751
|
-
version: "1.
|
|
34002
|
+
version: "1.203.0",
|
|
33752
34003
|
repository: {
|
|
33753
34004
|
type: "git",
|
|
33754
34005
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -36404,4 +36655,4 @@ var registerCommands = async (program2) => {
|
|
|
36404
36655
|
|
|
36405
36656
|
export { Command, metadata, registerCommands };
|
|
36406
36657
|
|
|
36407
|
-
//# debugId=
|
|
36658
|
+
//# debugId=DA01B4C11A6B7F0164756E2164756E21
|
package/dist/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/platform-tool",
|
|
3
|
+
"author": "UiPath",
|
|
3
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
4
|
-
"version": "1.
|
|
5
|
+
"version": "1.203.0-preview.180",
|
|
5
6
|
"description": "Manage UiPath platform-level resources such as tenant licensing.",
|
|
6
7
|
"publishConfig": {
|
|
7
8
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -20,5 +21,5 @@
|
|
|
20
21
|
"keywords": [
|
|
21
22
|
"cli-tool"
|
|
22
23
|
],
|
|
23
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "4e0a51e3ab2c9d89afd3d35a7b087a7fa58133a0"
|
|
24
25
|
}
|