@uipath/data-fabric-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/index.js
CHANGED
|
@@ -6582,8 +6582,9 @@ var require_src6 = __commonJS(function(exports) {
|
|
|
6582
6582
|
// package.json
|
|
6583
6583
|
var package_default = {
|
|
6584
6584
|
name: "@uipath/data-fabric-tool",
|
|
6585
|
+
author: "UiPath",
|
|
6585
6586
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
6586
|
-
version: "1.
|
|
6587
|
+
version: "1.203.0-preview.180",
|
|
6587
6588
|
description: "Manage Data Fabric entities and records.",
|
|
6588
6589
|
publishConfig: {
|
|
6589
6590
|
registry: "https://npm.pkg.github.com/"
|
|
@@ -7133,7 +7134,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
|
|
|
7133
7134
|
var EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
7134
7135
|
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
7135
7136
|
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
7136
|
-
var PADDED_BASE64_PATTERN = /[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
7137
|
+
var PADDED_BASE64_PATTERN = /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
7137
7138
|
var BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
|
|
7138
7139
|
var USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
|
|
7139
7140
|
var UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
|
|
@@ -7180,7 +7181,7 @@ var QUOTED_LITERAL_PATTERN = new RegExp([
|
|
|
7180
7181
|
`(?<![A-Za-z0-9])"(?:[^\\
|
|
7181
7182
|
]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
|
|
7182
7183
|
].join("|"), "g");
|
|
7183
|
-
var JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
|
|
7184
|
+
var JSON_BODY_PATTERN = /[{[][^{}[\]:,]*[:,][^{}[\]]*[\]}]/g;
|
|
7184
7185
|
var COLLAPSED_BODY = "{…}";
|
|
7185
7186
|
var COLLAPSED_BODY_MARKER = "\x01body\x01";
|
|
7186
7187
|
var MAX_BODY_NESTING = 8;
|
|
@@ -7195,10 +7196,13 @@ function collapseJsonBodies(text) {
|
|
|
7195
7196
|
}
|
|
7196
7197
|
return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
|
|
7197
7198
|
}
|
|
7198
|
-
var TRAILING_PROSE_PUNCT =
|
|
7199
|
+
var TRAILING_PROSE_PUNCT = `.,;:!?)]}>'"`;
|
|
7199
7200
|
function peelTrailingPunctuation(match) {
|
|
7200
|
-
|
|
7201
|
-
|
|
7201
|
+
let end = match.length;
|
|
7202
|
+
while (end > 0 && TRAILING_PROSE_PUNCT.includes(match[end - 1])) {
|
|
7203
|
+
end -= 1;
|
|
7204
|
+
}
|
|
7205
|
+
return [match.slice(0, end), match.slice(end)];
|
|
7202
7206
|
}
|
|
7203
7207
|
function redactUrl(raw) {
|
|
7204
7208
|
try {
|
|
@@ -7501,6 +7505,22 @@ function parseHttpStatusFromMessage(message) {
|
|
|
7501
7505
|
const status = Number(match[1]);
|
|
7502
7506
|
return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
7503
7507
|
}
|
|
7508
|
+
function findHttpStatusInGraph(error) {
|
|
7509
|
+
for (const node of walkErrorGraph(error)) {
|
|
7510
|
+
const response = node.response;
|
|
7511
|
+
const explicit = typeof node.status === "number" ? node.status : response?.status;
|
|
7512
|
+
if (typeof explicit === "number" && explicit >= 400 && explicit <= 599) {
|
|
7513
|
+
return explicit;
|
|
7514
|
+
}
|
|
7515
|
+
if (typeof node.message === "string") {
|
|
7516
|
+
const parsed = parseHttpStatusFromMessage(node.message);
|
|
7517
|
+
if (parsed !== undefined && parsed >= 400) {
|
|
7518
|
+
return parsed;
|
|
7519
|
+
}
|
|
7520
|
+
}
|
|
7521
|
+
}
|
|
7522
|
+
return;
|
|
7523
|
+
}
|
|
7504
7524
|
function isHtmlDocument(body) {
|
|
7505
7525
|
return /^\s*(<!doctype html|<html\b)/i.test(body);
|
|
7506
7526
|
}
|
|
@@ -7614,7 +7634,8 @@ async function extractErrorDetails(error, options) {
|
|
|
7614
7634
|
}
|
|
7615
7635
|
let message;
|
|
7616
7636
|
let result = "Failure";
|
|
7617
|
-
const
|
|
7637
|
+
const classificationStatus = status ?? findHttpStatusInGraph(error);
|
|
7638
|
+
const classification = classifyError(classificationStatus, error);
|
|
7618
7639
|
let retry = classification.retry;
|
|
7619
7640
|
if (status === 401) {
|
|
7620
7641
|
message = DEFAULT_401;
|
|
@@ -7690,8 +7711,8 @@ async function extractErrorDetails(error, options) {
|
|
|
7690
7711
|
details = describeThrownValue(error);
|
|
7691
7712
|
}
|
|
7692
7713
|
const context = {};
|
|
7693
|
-
if (
|
|
7694
|
-
context.httpStatus =
|
|
7714
|
+
if (classificationStatus) {
|
|
7715
|
+
context.httpStatus = classificationStatus;
|
|
7695
7716
|
}
|
|
7696
7717
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
7697
7718
|
context.errorCode = parsedBody.errorCode;
|
|
@@ -8262,7 +8283,8 @@ function readRegistryValue(keyPath, valueName) {
|
|
|
8262
8283
|
}
|
|
8263
8284
|
const [error, output] = catchError(() => execFileSync("reg", ["query", keyPath, "/v", valueName], {
|
|
8264
8285
|
encoding: "utf-8",
|
|
8265
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
8286
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
8287
|
+
windowsHide: true
|
|
8266
8288
|
}));
|
|
8267
8289
|
if (error) {
|
|
8268
8290
|
return "";
|
|
@@ -8944,28 +8966,32 @@ function isPlainRecord(value) {
|
|
|
8944
8966
|
const prototype = Object.getPrototypeOf(value);
|
|
8945
8967
|
return prototype === Object.prototype || prototype === null;
|
|
8946
8968
|
}
|
|
8947
|
-
function
|
|
8969
|
+
function splitPagedEnvelope(value) {
|
|
8948
8970
|
if (Array.isArray(value) || !isPlainRecord(value))
|
|
8949
8971
|
return null;
|
|
8950
|
-
const entries = Object.
|
|
8972
|
+
const entries = Object.entries(value);
|
|
8951
8973
|
if (entries.length === 0)
|
|
8952
8974
|
return null;
|
|
8953
|
-
let
|
|
8954
|
-
|
|
8955
|
-
for (const entry of entries) {
|
|
8975
|
+
let found = null;
|
|
8976
|
+
const meta = Object.create(null);
|
|
8977
|
+
for (const [key, entry] of entries) {
|
|
8956
8978
|
if (Array.isArray(entry)) {
|
|
8957
|
-
if (
|
|
8979
|
+
if (found !== null)
|
|
8958
8980
|
return null;
|
|
8959
|
-
|
|
8981
|
+
found = { key, rows: entry };
|
|
8960
8982
|
} else if (entry !== null && typeof entry === "object") {
|
|
8961
8983
|
return null;
|
|
8962
8984
|
} else {
|
|
8963
|
-
|
|
8985
|
+
meta[key] = entry;
|
|
8964
8986
|
}
|
|
8965
8987
|
}
|
|
8966
|
-
if (
|
|
8988
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
8967
8989
|
return null;
|
|
8968
|
-
return
|
|
8990
|
+
return { ...found, meta };
|
|
8991
|
+
}
|
|
8992
|
+
function extractPagedRows(value) {
|
|
8993
|
+
const paged = splitPagedEnvelope(value);
|
|
8994
|
+
return paged === null ? null : paged.rows;
|
|
8969
8995
|
}
|
|
8970
8996
|
function toLowerCamelCaseKey(key) {
|
|
8971
8997
|
if (!key)
|
|
@@ -9069,6 +9095,9 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
9069
9095
|
}
|
|
9070
9096
|
break;
|
|
9071
9097
|
}
|
|
9098
|
+
case "markdown":
|
|
9099
|
+
logFn(renderMarkdown(data));
|
|
9100
|
+
break;
|
|
9072
9101
|
default: {
|
|
9073
9102
|
const hasData = "Data" in data && data.Data != null;
|
|
9074
9103
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
@@ -9093,6 +9122,10 @@ function logOutput(data, format = "json", tableRowStyle) {
|
|
|
9093
9122
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
9094
9123
|
`), needsAsciiSafeJson(sink), styleFn);
|
|
9095
9124
|
}
|
|
9125
|
+
var PLUMBING_KEYS = new Set(["code", "log"]);
|
|
9126
|
+
function isPlumbingKey(key) {
|
|
9127
|
+
return PLUMBING_KEYS.has(key.toLowerCase());
|
|
9128
|
+
}
|
|
9096
9129
|
function cellToString(val) {
|
|
9097
9130
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
9098
9131
|
}
|
|
@@ -9108,7 +9141,7 @@ function wrapText(text, width) {
|
|
|
9108
9141
|
function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
9109
9142
|
if (data.length === 0)
|
|
9110
9143
|
return;
|
|
9111
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
9144
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
9112
9145
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
|
|
9113
9146
|
const header = keys.map((key, i) => key.padEnd(maxWidths[i])).join(" | ");
|
|
9114
9147
|
logFn(header);
|
|
@@ -9130,7 +9163,7 @@ function isNonEmptyPlainObject(value) {
|
|
|
9130
9163
|
}
|
|
9131
9164
|
var NESTED_INDENT = " ";
|
|
9132
9165
|
function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
9133
|
-
const keys = Object.keys(data).filter((key) => !
|
|
9166
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey(key));
|
|
9134
9167
|
if (keys.length === 0)
|
|
9135
9168
|
return;
|
|
9136
9169
|
const isBlockValue = (value) => isPlainObjectArray(value) || isNonEmptyPlainObject(value);
|
|
@@ -9161,7 +9194,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
|
9161
9194
|
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
9162
9195
|
if (data.length === 0)
|
|
9163
9196
|
return;
|
|
9164
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
9197
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
9165
9198
|
if (keys.length === 0)
|
|
9166
9199
|
return;
|
|
9167
9200
|
if (!process.stdout.isTTY) {
|
|
@@ -9235,6 +9268,220 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
9235
9268
|
logFn(`Log: ${externalLogValue}`);
|
|
9236
9269
|
}
|
|
9237
9270
|
}
|
|
9271
|
+
var MARKDOWN_MAX_CELL = 200;
|
|
9272
|
+
var MARKDOWN_MAX_DEPTH = 3;
|
|
9273
|
+
function markdownHeading(depth) {
|
|
9274
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
9275
|
+
}
|
|
9276
|
+
var BACKTICK_RUN = /`+/g;
|
|
9277
|
+
function fencedBlock(text) {
|
|
9278
|
+
const first = text.trimStart()[0];
|
|
9279
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
9280
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN), (match) => match[0].length));
|
|
9281
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
9282
|
+
return `${fence}${language}
|
|
9283
|
+
${text}
|
|
9284
|
+
${fence}`;
|
|
9285
|
+
}
|
|
9286
|
+
function collapseNewlineRuns(text) {
|
|
9287
|
+
return text.split(/(\s+)/).map((part, index) => index % 2 === 1 && part.includes(`
|
|
9288
|
+
`) ? " " : part).join("");
|
|
9289
|
+
}
|
|
9290
|
+
function markdownCell(value) {
|
|
9291
|
+
const text = value instanceof Date ? value.toISOString() : cellToString(value);
|
|
9292
|
+
return collapseNewlineRuns(text).replace(/\|/g, "\\|");
|
|
9293
|
+
}
|
|
9294
|
+
function markdownLabel(key) {
|
|
9295
|
+
return collapseNewlineRuns(key).replace(/[\\`*|]/g, "\\$&");
|
|
9296
|
+
}
|
|
9297
|
+
function withoutPlumbing(record) {
|
|
9298
|
+
const kept = Object.create(null);
|
|
9299
|
+
for (const [key, value] of Object.entries(record)) {
|
|
9300
|
+
if (!isPlumbingKey(key))
|
|
9301
|
+
kept[key] = value;
|
|
9302
|
+
}
|
|
9303
|
+
return kept;
|
|
9304
|
+
}
|
|
9305
|
+
function rowsWithoutPlumbing(rows) {
|
|
9306
|
+
return rows.map((row) => isPlainRecord(row) ? withoutPlumbing(row) : row);
|
|
9307
|
+
}
|
|
9308
|
+
function markdownTable(rows) {
|
|
9309
|
+
const columns = [];
|
|
9310
|
+
const seen = new Set;
|
|
9311
|
+
for (const row of rows) {
|
|
9312
|
+
for (const key of Object.keys(row)) {
|
|
9313
|
+
if (!seen.has(key)) {
|
|
9314
|
+
seen.add(key);
|
|
9315
|
+
columns.push(key);
|
|
9316
|
+
}
|
|
9317
|
+
}
|
|
9318
|
+
}
|
|
9319
|
+
if (columns.length === 0)
|
|
9320
|
+
return null;
|
|
9321
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell(row[key])));
|
|
9322
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL))) {
|
|
9323
|
+
return null;
|
|
9324
|
+
}
|
|
9325
|
+
return [
|
|
9326
|
+
`| ${columns.map(markdownLabel).join(" | ")} |`,
|
|
9327
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
9328
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
9329
|
+
].join(`
|
|
9330
|
+
`);
|
|
9331
|
+
}
|
|
9332
|
+
function extractMessageSequence(rows) {
|
|
9333
|
+
const messages = [];
|
|
9334
|
+
for (const row of rows) {
|
|
9335
|
+
const message = extractSingleMessage(row);
|
|
9336
|
+
if (message === null)
|
|
9337
|
+
return null;
|
|
9338
|
+
messages.push(message);
|
|
9339
|
+
}
|
|
9340
|
+
return messages.join(`
|
|
9341
|
+
|
|
9342
|
+
`);
|
|
9343
|
+
}
|
|
9344
|
+
function markdownRows(rows, depth) {
|
|
9345
|
+
if (rows.length === 0)
|
|
9346
|
+
return "(none)";
|
|
9347
|
+
if (!isPlainObjectArray(rows)) {
|
|
9348
|
+
return rows.map((item) => `- ${markdownCell(item)}`).join(`
|
|
9349
|
+
`);
|
|
9350
|
+
}
|
|
9351
|
+
const prose = extractMessageSequence(rows);
|
|
9352
|
+
if (prose !== null)
|
|
9353
|
+
return prose;
|
|
9354
|
+
const table = markdownTable(rows);
|
|
9355
|
+
if (table !== null)
|
|
9356
|
+
return table;
|
|
9357
|
+
if (depth >= MARKDOWN_MAX_DEPTH) {
|
|
9358
|
+
return fencedBlock(JSON.stringify(rows, null, 2));
|
|
9359
|
+
}
|
|
9360
|
+
return rows.map((row, index) => [
|
|
9361
|
+
`${markdownHeading(depth)} ${index + 1}`,
|
|
9362
|
+
markdownObject(row, depth + 1)
|
|
9363
|
+
].join(`
|
|
9364
|
+
|
|
9365
|
+
`)).join(`
|
|
9366
|
+
|
|
9367
|
+
`);
|
|
9368
|
+
}
|
|
9369
|
+
function markdownObject(obj, depth) {
|
|
9370
|
+
const scalars = [];
|
|
9371
|
+
const blocks = [];
|
|
9372
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
9373
|
+
if (value === undefined)
|
|
9374
|
+
continue;
|
|
9375
|
+
const label = markdownLabel(key);
|
|
9376
|
+
if (Array.isArray(value)) {
|
|
9377
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
9378
|
+
|
|
9379
|
+
${markdownRows(value, depth + 1)}`);
|
|
9380
|
+
} else if (isNonEmptyPlainObject(value)) {
|
|
9381
|
+
const nested = depth < MARKDOWN_MAX_DEPTH ? markdownObject(value, depth + 1) : fencedBlock(JSON.stringify(value, null, 2));
|
|
9382
|
+
if (nested !== "") {
|
|
9383
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
9384
|
+
|
|
9385
|
+
${nested}`);
|
|
9386
|
+
}
|
|
9387
|
+
} else if (typeof value === "string" && value.includes(`
|
|
9388
|
+
`)) {
|
|
9389
|
+
blocks.push(`**${label}:**
|
|
9390
|
+
|
|
9391
|
+
${fencedBlock(value)}`);
|
|
9392
|
+
} else {
|
|
9393
|
+
scalars.push(`**${label}:** ${markdownCell(value)}`);
|
|
9394
|
+
}
|
|
9395
|
+
}
|
|
9396
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
9397
|
+
`)] : [];
|
|
9398
|
+
sections.push(...blocks);
|
|
9399
|
+
return sections.join(`
|
|
9400
|
+
|
|
9401
|
+
`);
|
|
9402
|
+
}
|
|
9403
|
+
function extractSingleMessage(payload) {
|
|
9404
|
+
if (!isPlainRecord(payload))
|
|
9405
|
+
return null;
|
|
9406
|
+
const keys = Object.keys(payload);
|
|
9407
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
9408
|
+
return null;
|
|
9409
|
+
const value = payload[keys[0]];
|
|
9410
|
+
return typeof value === "string" ? value : null;
|
|
9411
|
+
}
|
|
9412
|
+
function markdownPayload(payload) {
|
|
9413
|
+
const message = extractSingleMessage(payload);
|
|
9414
|
+
if (message !== null)
|
|
9415
|
+
return message;
|
|
9416
|
+
if (Array.isArray(payload)) {
|
|
9417
|
+
return markdownRows(rowsWithoutPlumbing(payload), 0);
|
|
9418
|
+
}
|
|
9419
|
+
const visible = withoutPlumbing(payload);
|
|
9420
|
+
const paged = splitPagedEnvelope(visible);
|
|
9421
|
+
if (paged !== null) {
|
|
9422
|
+
const meta = markdownObject(paged.meta, 0);
|
|
9423
|
+
const rows = `${markdownHeading(0)} ${markdownLabel(paged.key)}
|
|
9424
|
+
|
|
9425
|
+
${markdownRows(rowsWithoutPlumbing(paged.rows), 1)}`;
|
|
9426
|
+
return meta === "" ? rows : `${meta}
|
|
9427
|
+
|
|
9428
|
+
${rows}`;
|
|
9429
|
+
}
|
|
9430
|
+
return markdownObject(visible, 0);
|
|
9431
|
+
}
|
|
9432
|
+
function isPaginationWorthShowing(value) {
|
|
9433
|
+
if (typeof value !== "object" || value === null)
|
|
9434
|
+
return false;
|
|
9435
|
+
const page = value;
|
|
9436
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
9437
|
+
}
|
|
9438
|
+
function markdownEnvelopeNotes(data) {
|
|
9439
|
+
const envelope = data;
|
|
9440
|
+
const notes = [];
|
|
9441
|
+
const warning = envelope.Warning;
|
|
9442
|
+
if (typeof warning === "string" && warning !== "") {
|
|
9443
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
9444
|
+
}
|
|
9445
|
+
const instructions = envelope.Instructions;
|
|
9446
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
9447
|
+
notes.push(`> ${instructions}`);
|
|
9448
|
+
}
|
|
9449
|
+
const pagination = envelope.Pagination;
|
|
9450
|
+
if (isPaginationWorthShowing(pagination)) {
|
|
9451
|
+
const body = markdownObject(pagination, 1);
|
|
9452
|
+
if (body !== "") {
|
|
9453
|
+
notes.push(`${markdownHeading(0)} Pagination
|
|
9454
|
+
|
|
9455
|
+
${body}`);
|
|
9456
|
+
}
|
|
9457
|
+
}
|
|
9458
|
+
const log = envelope.Log;
|
|
9459
|
+
if (typeof log === "string" && log !== "") {
|
|
9460
|
+
notes.push(`**Log:** ${log}`);
|
|
9461
|
+
}
|
|
9462
|
+
return notes;
|
|
9463
|
+
}
|
|
9464
|
+
function renderMarkdown(data) {
|
|
9465
|
+
if (data.Result !== RESULTS.Success) {
|
|
9466
|
+
const failure = data;
|
|
9467
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
9468
|
+
if (failure.Data != null) {
|
|
9469
|
+
sections.push(markdownPayload(failure.Data));
|
|
9470
|
+
}
|
|
9471
|
+
if (failure.Instructions) {
|
|
9472
|
+
sections.push(`> ${failure.Instructions}`);
|
|
9473
|
+
}
|
|
9474
|
+
return sections.filter((section) => section !== "").join(`
|
|
9475
|
+
|
|
9476
|
+
`);
|
|
9477
|
+
}
|
|
9478
|
+
if (!("Data" in data) || data.Data == null) {
|
|
9479
|
+
return markdownObject(withoutPlumbing(data), 0);
|
|
9480
|
+
}
|
|
9481
|
+
return [markdownPayload(data.Data), ...markdownEnvelopeNotes(data)].filter((section) => section !== "").join(`
|
|
9482
|
+
|
|
9483
|
+
`);
|
|
9484
|
+
}
|
|
9238
9485
|
function toYaml(data) {
|
|
9239
9486
|
const codec = getYamlCodec();
|
|
9240
9487
|
if (!codec) {
|
|
@@ -11064,16 +11311,7 @@ var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) =
|
|
|
11064
11311
|
errorMessage: location.source === "absolute" ? `Environment file not found: ${envFilePath}` : `Unable to locate environment file: ${envFilePath}. Run 'uip login' to authenticate.`
|
|
11065
11312
|
};
|
|
11066
11313
|
};
|
|
11067
|
-
var
|
|
11068
|
-
const fs2 = getFileSystem();
|
|
11069
|
-
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
11070
|
-
if (!await fs2.exists(absolutePath)) {
|
|
11071
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
11072
|
-
}
|
|
11073
|
-
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
11074
|
-
if (content === null) {
|
|
11075
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
11076
|
-
}
|
|
11314
|
+
var parseEnvContent = (content) => {
|
|
11077
11315
|
const env = {};
|
|
11078
11316
|
for (const line of content.split(`
|
|
11079
11317
|
`)) {
|
|
@@ -11094,6 +11332,18 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
11094
11332
|
}
|
|
11095
11333
|
return env;
|
|
11096
11334
|
};
|
|
11335
|
+
var loadEnvFileAsync = async ({ envPath }) => {
|
|
11336
|
+
const fs2 = getFileSystem();
|
|
11337
|
+
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
11338
|
+
if (!await fs2.exists(absolutePath)) {
|
|
11339
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
11340
|
+
}
|
|
11341
|
+
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
11342
|
+
if (content === null) {
|
|
11343
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
11344
|
+
}
|
|
11345
|
+
return parseEnvContent(content);
|
|
11346
|
+
};
|
|
11097
11347
|
var saveEnvFileAsync = async ({
|
|
11098
11348
|
envPath,
|
|
11099
11349
|
data,
|
|
@@ -25843,4 +26093,4 @@ var registerCommands = async (program2) => {
|
|
|
25843
26093
|
|
|
25844
26094
|
export { Command, metadata, registerCommands };
|
|
25845
26095
|
|
|
25846
|
-
//# debugId=
|
|
26096
|
+
//# debugId=69DBDC7ADA8D9C7A64756E2164756E21
|
package/dist/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/data-fabric-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 Data Fabric entities and records.",
|
|
6
7
|
"publishConfig": {
|
|
7
8
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -18,5 +19,5 @@
|
|
|
18
19
|
"files": [
|
|
19
20
|
"dist"
|
|
20
21
|
],
|
|
21
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "4e0a51e3ab2c9d89afd3d35a7b087a7fa58133a0"
|
|
22
23
|
}
|