@uipath/conversational-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 +2 -0
- package/dist/{cas-client-xn1g9smp.js → cas-client-2gk8fd2k.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{tool-5215zcgg.js → tool-ts05e7an.js} +284 -34
- package/dist/{tool-79t6f69r.js → tool-vgafqfsp.js} +4 -4
- package/dist/tool.js +2 -2
- package/package.json +3 -2
|
@@ -1786,6 +1786,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
1786
1786
|
|
|
1787
1787
|
## socket.io-client@4.8.3
|
|
1788
1788
|
|
|
1789
|
+
Licence decision: No `license` field in this version's manifest; MIT upstream and in every neighbouring socket.io package.
|
|
1790
|
+
|
|
1789
1791
|
SPDX: MIT
|
|
1790
1792
|
|
|
1791
1793
|
```
|
package/dist/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
metadata,
|
|
4
4
|
registerCommands
|
|
5
|
-
} from "./tool-
|
|
5
|
+
} from "./tool-vgafqfsp.js";
|
|
6
6
|
import"./tool-nkyhbf79.js";
|
|
7
7
|
import {
|
|
8
8
|
Command
|
|
9
|
-
} from "./tool-
|
|
9
|
+
} from "./tool-ts05e7an.js";
|
|
10
10
|
import"./tool-mpvp5rqs.js";
|
|
11
11
|
import"./tool-1yh8g550.js";
|
|
12
12
|
|
|
@@ -2099,8 +2099,9 @@ var require_commander = __commonJS(function(exports) {
|
|
|
2099
2099
|
// package.json
|
|
2100
2100
|
var package_default = {
|
|
2101
2101
|
name: "@uipath/conversational-tool",
|
|
2102
|
+
author: "UiPath",
|
|
2102
2103
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
2103
|
-
version: "1.
|
|
2104
|
+
version: "1.203.0-preview.180",
|
|
2104
2105
|
description: "Handle conversations with deployed UiPath conversational processes.",
|
|
2105
2106
|
publishConfig: {
|
|
2106
2107
|
registry: "https://npm.pkg.github.com/"
|
|
@@ -2703,7 +2704,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
|
|
|
2703
2704
|
var EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
2704
2705
|
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
2705
2706
|
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
2706
|
-
var PADDED_BASE64_PATTERN = /[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
2707
|
+
var PADDED_BASE64_PATTERN = /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
2707
2708
|
var BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
|
|
2708
2709
|
var USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
|
|
2709
2710
|
var UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
|
|
@@ -2750,7 +2751,7 @@ var QUOTED_LITERAL_PATTERN = new RegExp([
|
|
|
2750
2751
|
`(?<![A-Za-z0-9])"(?:[^\\
|
|
2751
2752
|
]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
|
|
2752
2753
|
].join("|"), "g");
|
|
2753
|
-
var JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
|
|
2754
|
+
var JSON_BODY_PATTERN = /[{[][^{}[\]:,]*[:,][^{}[\]]*[\]}]/g;
|
|
2754
2755
|
var COLLAPSED_BODY = "{…}";
|
|
2755
2756
|
var COLLAPSED_BODY_MARKER = "\x01body\x01";
|
|
2756
2757
|
var MAX_BODY_NESTING = 8;
|
|
@@ -2765,10 +2766,13 @@ function collapseJsonBodies(text) {
|
|
|
2765
2766
|
}
|
|
2766
2767
|
return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
|
|
2767
2768
|
}
|
|
2768
|
-
var TRAILING_PROSE_PUNCT =
|
|
2769
|
+
var TRAILING_PROSE_PUNCT = `.,;:!?)]}>'"`;
|
|
2769
2770
|
function peelTrailingPunctuation(match) {
|
|
2770
|
-
|
|
2771
|
-
|
|
2771
|
+
let end = match.length;
|
|
2772
|
+
while (end > 0 && TRAILING_PROSE_PUNCT.includes(match[end - 1])) {
|
|
2773
|
+
end -= 1;
|
|
2774
|
+
}
|
|
2775
|
+
return [match.slice(0, end), match.slice(end)];
|
|
2772
2776
|
}
|
|
2773
2777
|
function redactUrl(raw) {
|
|
2774
2778
|
try {
|
|
@@ -3071,6 +3075,22 @@ function parseHttpStatusFromMessage(message) {
|
|
|
3071
3075
|
const status = Number(match[1]);
|
|
3072
3076
|
return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
3073
3077
|
}
|
|
3078
|
+
function findHttpStatusInGraph(error) {
|
|
3079
|
+
for (const node of walkErrorGraph(error)) {
|
|
3080
|
+
const response = node.response;
|
|
3081
|
+
const explicit = typeof node.status === "number" ? node.status : response?.status;
|
|
3082
|
+
if (typeof explicit === "number" && explicit >= 400 && explicit <= 599) {
|
|
3083
|
+
return explicit;
|
|
3084
|
+
}
|
|
3085
|
+
if (typeof node.message === "string") {
|
|
3086
|
+
const parsed = parseHttpStatusFromMessage(node.message);
|
|
3087
|
+
if (parsed !== undefined && parsed >= 400) {
|
|
3088
|
+
return parsed;
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
return;
|
|
3093
|
+
}
|
|
3074
3094
|
function isHtmlDocument(body) {
|
|
3075
3095
|
return /^\s*(<!doctype html|<html\b)/i.test(body);
|
|
3076
3096
|
}
|
|
@@ -3184,7 +3204,8 @@ async function extractErrorDetails(error, options) {
|
|
|
3184
3204
|
}
|
|
3185
3205
|
let message;
|
|
3186
3206
|
let result = "Failure";
|
|
3187
|
-
const
|
|
3207
|
+
const classificationStatus = status ?? findHttpStatusInGraph(error);
|
|
3208
|
+
const classification = classifyError(classificationStatus, error);
|
|
3188
3209
|
let retry = classification.retry;
|
|
3189
3210
|
if (status === 401) {
|
|
3190
3211
|
message = DEFAULT_401;
|
|
@@ -3260,8 +3281,8 @@ async function extractErrorDetails(error, options) {
|
|
|
3260
3281
|
details = describeThrownValue(error);
|
|
3261
3282
|
}
|
|
3262
3283
|
const context = {};
|
|
3263
|
-
if (
|
|
3264
|
-
context.httpStatus =
|
|
3284
|
+
if (classificationStatus) {
|
|
3285
|
+
context.httpStatus = classificationStatus;
|
|
3265
3286
|
}
|
|
3266
3287
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
3267
3288
|
context.errorCode = parsedBody.errorCode;
|
|
@@ -3833,7 +3854,8 @@ function readRegistryValue(keyPath, valueName) {
|
|
|
3833
3854
|
}
|
|
3834
3855
|
const [error, output] = catchError(() => execFileSync("reg", ["query", keyPath, "/v", valueName], {
|
|
3835
3856
|
encoding: "utf-8",
|
|
3836
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
3857
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
3858
|
+
windowsHide: true
|
|
3837
3859
|
}));
|
|
3838
3860
|
if (error) {
|
|
3839
3861
|
return "";
|
|
@@ -4509,28 +4531,32 @@ function isPlainRecord(value) {
|
|
|
4509
4531
|
const prototype = Object.getPrototypeOf(value);
|
|
4510
4532
|
return prototype === Object.prototype || prototype === null;
|
|
4511
4533
|
}
|
|
4512
|
-
function
|
|
4534
|
+
function splitPagedEnvelope(value) {
|
|
4513
4535
|
if (Array.isArray(value) || !isPlainRecord(value))
|
|
4514
4536
|
return null;
|
|
4515
|
-
const entries = Object.
|
|
4537
|
+
const entries = Object.entries(value);
|
|
4516
4538
|
if (entries.length === 0)
|
|
4517
4539
|
return null;
|
|
4518
|
-
let
|
|
4519
|
-
|
|
4520
|
-
for (const entry of entries) {
|
|
4540
|
+
let found = null;
|
|
4541
|
+
const meta = Object.create(null);
|
|
4542
|
+
for (const [key, entry] of entries) {
|
|
4521
4543
|
if (Array.isArray(entry)) {
|
|
4522
|
-
if (
|
|
4544
|
+
if (found !== null)
|
|
4523
4545
|
return null;
|
|
4524
|
-
|
|
4546
|
+
found = { key, rows: entry };
|
|
4525
4547
|
} else if (entry !== null && typeof entry === "object") {
|
|
4526
4548
|
return null;
|
|
4527
4549
|
} else {
|
|
4528
|
-
|
|
4550
|
+
meta[key] = entry;
|
|
4529
4551
|
}
|
|
4530
4552
|
}
|
|
4531
|
-
if (
|
|
4553
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
4532
4554
|
return null;
|
|
4533
|
-
return
|
|
4555
|
+
return { ...found, meta };
|
|
4556
|
+
}
|
|
4557
|
+
function extractPagedRows(value) {
|
|
4558
|
+
const paged = splitPagedEnvelope(value);
|
|
4559
|
+
return paged === null ? null : paged.rows;
|
|
4534
4560
|
}
|
|
4535
4561
|
function toLowerCamelCaseKey(key) {
|
|
4536
4562
|
if (!key)
|
|
@@ -4634,6 +4660,9 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
4634
4660
|
}
|
|
4635
4661
|
break;
|
|
4636
4662
|
}
|
|
4663
|
+
case "markdown":
|
|
4664
|
+
logFn(renderMarkdown(data));
|
|
4665
|
+
break;
|
|
4637
4666
|
default: {
|
|
4638
4667
|
const hasData = "Data" in data && data.Data != null;
|
|
4639
4668
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
@@ -4658,6 +4687,10 @@ function logOutput(data, format = "json", tableRowStyle) {
|
|
|
4658
4687
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
4659
4688
|
`), needsAsciiSafeJson(sink), styleFn);
|
|
4660
4689
|
}
|
|
4690
|
+
var PLUMBING_KEYS = new Set(["code", "log"]);
|
|
4691
|
+
function isPlumbingKey(key) {
|
|
4692
|
+
return PLUMBING_KEYS.has(key.toLowerCase());
|
|
4693
|
+
}
|
|
4661
4694
|
function cellToString(val) {
|
|
4662
4695
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
4663
4696
|
}
|
|
@@ -4673,7 +4706,7 @@ function wrapText(text, width) {
|
|
|
4673
4706
|
function printTable(data, logFn, externalLogValue, 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
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
|
|
4678
4711
|
const header = keys.map((key, i) => key.padEnd(maxWidths[i])).join(" | ");
|
|
4679
4712
|
logFn(header);
|
|
@@ -4695,7 +4728,7 @@ function isNonEmptyPlainObject(value) {
|
|
|
4695
4728
|
}
|
|
4696
4729
|
var NESTED_INDENT = " ";
|
|
4697
4730
|
function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
4698
|
-
const keys = Object.keys(data).filter((key) => !
|
|
4731
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey(key));
|
|
4699
4732
|
if (keys.length === 0)
|
|
4700
4733
|
return;
|
|
4701
4734
|
const isBlockValue = (value) => isPlainObjectArray(value) || isNonEmptyPlainObject(value);
|
|
@@ -4726,7 +4759,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
|
4726
4759
|
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
4727
4760
|
if (data.length === 0)
|
|
4728
4761
|
return;
|
|
4729
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
4762
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
4730
4763
|
if (keys.length === 0)
|
|
4731
4764
|
return;
|
|
4732
4765
|
if (!process.stdout.isTTY) {
|
|
@@ -4800,6 +4833,220 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
4800
4833
|
logFn(`Log: ${externalLogValue}`);
|
|
4801
4834
|
}
|
|
4802
4835
|
}
|
|
4836
|
+
var MARKDOWN_MAX_CELL = 200;
|
|
4837
|
+
var MARKDOWN_MAX_DEPTH = 3;
|
|
4838
|
+
function markdownHeading(depth) {
|
|
4839
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
4840
|
+
}
|
|
4841
|
+
var BACKTICK_RUN = /`+/g;
|
|
4842
|
+
function fencedBlock(text) {
|
|
4843
|
+
const first = text.trimStart()[0];
|
|
4844
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
4845
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN), (match) => match[0].length));
|
|
4846
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
4847
|
+
return `${fence}${language}
|
|
4848
|
+
${text}
|
|
4849
|
+
${fence}`;
|
|
4850
|
+
}
|
|
4851
|
+
function collapseNewlineRuns(text) {
|
|
4852
|
+
return text.split(/(\s+)/).map((part, index) => index % 2 === 1 && part.includes(`
|
|
4853
|
+
`) ? " " : part).join("");
|
|
4854
|
+
}
|
|
4855
|
+
function markdownCell(value) {
|
|
4856
|
+
const text = value instanceof Date ? value.toISOString() : cellToString(value);
|
|
4857
|
+
return collapseNewlineRuns(text).replace(/\|/g, "\\|");
|
|
4858
|
+
}
|
|
4859
|
+
function markdownLabel(key) {
|
|
4860
|
+
return collapseNewlineRuns(key).replace(/[\\`*|]/g, "\\$&");
|
|
4861
|
+
}
|
|
4862
|
+
function withoutPlumbing(record) {
|
|
4863
|
+
const kept = Object.create(null);
|
|
4864
|
+
for (const [key, value] of Object.entries(record)) {
|
|
4865
|
+
if (!isPlumbingKey(key))
|
|
4866
|
+
kept[key] = value;
|
|
4867
|
+
}
|
|
4868
|
+
return kept;
|
|
4869
|
+
}
|
|
4870
|
+
function rowsWithoutPlumbing(rows) {
|
|
4871
|
+
return rows.map((row) => isPlainRecord(row) ? withoutPlumbing(row) : row);
|
|
4872
|
+
}
|
|
4873
|
+
function markdownTable(rows) {
|
|
4874
|
+
const columns = [];
|
|
4875
|
+
const seen = new Set;
|
|
4876
|
+
for (const row of rows) {
|
|
4877
|
+
for (const key of Object.keys(row)) {
|
|
4878
|
+
if (!seen.has(key)) {
|
|
4879
|
+
seen.add(key);
|
|
4880
|
+
columns.push(key);
|
|
4881
|
+
}
|
|
4882
|
+
}
|
|
4883
|
+
}
|
|
4884
|
+
if (columns.length === 0)
|
|
4885
|
+
return null;
|
|
4886
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell(row[key])));
|
|
4887
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL))) {
|
|
4888
|
+
return null;
|
|
4889
|
+
}
|
|
4890
|
+
return [
|
|
4891
|
+
`| ${columns.map(markdownLabel).join(" | ")} |`,
|
|
4892
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
4893
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
4894
|
+
].join(`
|
|
4895
|
+
`);
|
|
4896
|
+
}
|
|
4897
|
+
function extractMessageSequence(rows) {
|
|
4898
|
+
const messages = [];
|
|
4899
|
+
for (const row of rows) {
|
|
4900
|
+
const message = extractSingleMessage(row);
|
|
4901
|
+
if (message === null)
|
|
4902
|
+
return null;
|
|
4903
|
+
messages.push(message);
|
|
4904
|
+
}
|
|
4905
|
+
return messages.join(`
|
|
4906
|
+
|
|
4907
|
+
`);
|
|
4908
|
+
}
|
|
4909
|
+
function markdownRows(rows, depth) {
|
|
4910
|
+
if (rows.length === 0)
|
|
4911
|
+
return "(none)";
|
|
4912
|
+
if (!isPlainObjectArray(rows)) {
|
|
4913
|
+
return rows.map((item) => `- ${markdownCell(item)}`).join(`
|
|
4914
|
+
`);
|
|
4915
|
+
}
|
|
4916
|
+
const prose = extractMessageSequence(rows);
|
|
4917
|
+
if (prose !== null)
|
|
4918
|
+
return prose;
|
|
4919
|
+
const table = markdownTable(rows);
|
|
4920
|
+
if (table !== null)
|
|
4921
|
+
return table;
|
|
4922
|
+
if (depth >= MARKDOWN_MAX_DEPTH) {
|
|
4923
|
+
return fencedBlock(JSON.stringify(rows, null, 2));
|
|
4924
|
+
}
|
|
4925
|
+
return rows.map((row, index) => [
|
|
4926
|
+
`${markdownHeading(depth)} ${index + 1}`,
|
|
4927
|
+
markdownObject(row, depth + 1)
|
|
4928
|
+
].join(`
|
|
4929
|
+
|
|
4930
|
+
`)).join(`
|
|
4931
|
+
|
|
4932
|
+
`);
|
|
4933
|
+
}
|
|
4934
|
+
function markdownObject(obj, depth) {
|
|
4935
|
+
const scalars = [];
|
|
4936
|
+
const blocks = [];
|
|
4937
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
4938
|
+
if (value === undefined)
|
|
4939
|
+
continue;
|
|
4940
|
+
const label = markdownLabel(key);
|
|
4941
|
+
if (Array.isArray(value)) {
|
|
4942
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
4943
|
+
|
|
4944
|
+
${markdownRows(value, depth + 1)}`);
|
|
4945
|
+
} else if (isNonEmptyPlainObject(value)) {
|
|
4946
|
+
const nested = depth < MARKDOWN_MAX_DEPTH ? markdownObject(value, depth + 1) : fencedBlock(JSON.stringify(value, null, 2));
|
|
4947
|
+
if (nested !== "") {
|
|
4948
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
4949
|
+
|
|
4950
|
+
${nested}`);
|
|
4951
|
+
}
|
|
4952
|
+
} else if (typeof value === "string" && value.includes(`
|
|
4953
|
+
`)) {
|
|
4954
|
+
blocks.push(`**${label}:**
|
|
4955
|
+
|
|
4956
|
+
${fencedBlock(value)}`);
|
|
4957
|
+
} else {
|
|
4958
|
+
scalars.push(`**${label}:** ${markdownCell(value)}`);
|
|
4959
|
+
}
|
|
4960
|
+
}
|
|
4961
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
4962
|
+
`)] : [];
|
|
4963
|
+
sections.push(...blocks);
|
|
4964
|
+
return sections.join(`
|
|
4965
|
+
|
|
4966
|
+
`);
|
|
4967
|
+
}
|
|
4968
|
+
function extractSingleMessage(payload) {
|
|
4969
|
+
if (!isPlainRecord(payload))
|
|
4970
|
+
return null;
|
|
4971
|
+
const keys = Object.keys(payload);
|
|
4972
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
4973
|
+
return null;
|
|
4974
|
+
const value = payload[keys[0]];
|
|
4975
|
+
return typeof value === "string" ? value : null;
|
|
4976
|
+
}
|
|
4977
|
+
function markdownPayload(payload) {
|
|
4978
|
+
const message = extractSingleMessage(payload);
|
|
4979
|
+
if (message !== null)
|
|
4980
|
+
return message;
|
|
4981
|
+
if (Array.isArray(payload)) {
|
|
4982
|
+
return markdownRows(rowsWithoutPlumbing(payload), 0);
|
|
4983
|
+
}
|
|
4984
|
+
const visible = withoutPlumbing(payload);
|
|
4985
|
+
const paged = splitPagedEnvelope(visible);
|
|
4986
|
+
if (paged !== null) {
|
|
4987
|
+
const meta = markdownObject(paged.meta, 0);
|
|
4988
|
+
const rows = `${markdownHeading(0)} ${markdownLabel(paged.key)}
|
|
4989
|
+
|
|
4990
|
+
${markdownRows(rowsWithoutPlumbing(paged.rows), 1)}`;
|
|
4991
|
+
return meta === "" ? rows : `${meta}
|
|
4992
|
+
|
|
4993
|
+
${rows}`;
|
|
4994
|
+
}
|
|
4995
|
+
return markdownObject(visible, 0);
|
|
4996
|
+
}
|
|
4997
|
+
function isPaginationWorthShowing(value) {
|
|
4998
|
+
if (typeof value !== "object" || value === null)
|
|
4999
|
+
return false;
|
|
5000
|
+
const page = value;
|
|
5001
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
5002
|
+
}
|
|
5003
|
+
function markdownEnvelopeNotes(data) {
|
|
5004
|
+
const envelope = data;
|
|
5005
|
+
const notes = [];
|
|
5006
|
+
const warning = envelope.Warning;
|
|
5007
|
+
if (typeof warning === "string" && warning !== "") {
|
|
5008
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
5009
|
+
}
|
|
5010
|
+
const instructions = envelope.Instructions;
|
|
5011
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
5012
|
+
notes.push(`> ${instructions}`);
|
|
5013
|
+
}
|
|
5014
|
+
const pagination = envelope.Pagination;
|
|
5015
|
+
if (isPaginationWorthShowing(pagination)) {
|
|
5016
|
+
const body = markdownObject(pagination, 1);
|
|
5017
|
+
if (body !== "") {
|
|
5018
|
+
notes.push(`${markdownHeading(0)} Pagination
|
|
5019
|
+
|
|
5020
|
+
${body}`);
|
|
5021
|
+
}
|
|
5022
|
+
}
|
|
5023
|
+
const log = envelope.Log;
|
|
5024
|
+
if (typeof log === "string" && log !== "") {
|
|
5025
|
+
notes.push(`**Log:** ${log}`);
|
|
5026
|
+
}
|
|
5027
|
+
return notes;
|
|
5028
|
+
}
|
|
5029
|
+
function renderMarkdown(data) {
|
|
5030
|
+
if (data.Result !== RESULTS.Success) {
|
|
5031
|
+
const failure = data;
|
|
5032
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
5033
|
+
if (failure.Data != null) {
|
|
5034
|
+
sections.push(markdownPayload(failure.Data));
|
|
5035
|
+
}
|
|
5036
|
+
if (failure.Instructions) {
|
|
5037
|
+
sections.push(`> ${failure.Instructions}`);
|
|
5038
|
+
}
|
|
5039
|
+
return sections.filter((section) => section !== "").join(`
|
|
5040
|
+
|
|
5041
|
+
`);
|
|
5042
|
+
}
|
|
5043
|
+
if (!("Data" in data) || data.Data == null) {
|
|
5044
|
+
return markdownObject(withoutPlumbing(data), 0);
|
|
5045
|
+
}
|
|
5046
|
+
return [markdownPayload(data.Data), ...markdownEnvelopeNotes(data)].filter((section) => section !== "").join(`
|
|
5047
|
+
|
|
5048
|
+
`);
|
|
5049
|
+
}
|
|
4803
5050
|
function toYaml(data) {
|
|
4804
5051
|
const codec = getYamlCodec();
|
|
4805
5052
|
if (!codec) {
|
|
@@ -6606,16 +6853,7 @@ var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) =
|
|
|
6606
6853
|
errorMessage: location.source === "absolute" ? `Environment file not found: ${envFilePath}` : `Unable to locate environment file: ${envFilePath}. Run 'uip login' to authenticate.`
|
|
6607
6854
|
};
|
|
6608
6855
|
};
|
|
6609
|
-
var
|
|
6610
|
-
const fs2 = getFileSystem();
|
|
6611
|
-
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
6612
|
-
if (!await fs2.exists(absolutePath)) {
|
|
6613
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
6614
|
-
}
|
|
6615
|
-
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
6616
|
-
if (content === null) {
|
|
6617
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
6618
|
-
}
|
|
6856
|
+
var parseEnvContent = (content) => {
|
|
6619
6857
|
const env = {};
|
|
6620
6858
|
for (const line of content.split(`
|
|
6621
6859
|
`)) {
|
|
@@ -6636,6 +6874,18 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
6636
6874
|
}
|
|
6637
6875
|
return env;
|
|
6638
6876
|
};
|
|
6877
|
+
var loadEnvFileAsync = async ({ envPath }) => {
|
|
6878
|
+
const fs2 = getFileSystem();
|
|
6879
|
+
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
6880
|
+
if (!await fs2.exists(absolutePath)) {
|
|
6881
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
6882
|
+
}
|
|
6883
|
+
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
6884
|
+
if (content === null) {
|
|
6885
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
6886
|
+
}
|
|
6887
|
+
return parseEnvContent(content);
|
|
6888
|
+
};
|
|
6639
6889
|
var saveEnvFileAsync = async ({
|
|
6640
6890
|
envPath,
|
|
6641
6891
|
data,
|
|
@@ -7159,4 +7409,4 @@ var CLI_EXTERNAL_USER_ID = "app-user-cli-cas";
|
|
|
7159
7409
|
|
|
7160
7410
|
export { package_default, getFileSystem, catchError, extractErrorDetails, extractErrorMessageSync, RESULTS, EXIT_CODES, OutputFormatter, InvalidArgumentError, Command, processContext, requireConfirmation, instructionsFor, canPrompt, parseBoundedInt, getSdkUserAgentToken, addSdkUserAgentHeader, getLoginStatusAsync, CLI_EXTERNAL_USER_ID };
|
|
7161
7411
|
|
|
7162
|
-
//# debugId=
|
|
7412
|
+
//# debugId=E6F9DA4F81A906C864756E2164756E21
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
parseBoundedInt,
|
|
21
21
|
processContext,
|
|
22
22
|
requireConfirmation
|
|
23
|
-
} from "./tool-
|
|
23
|
+
} from "./tool-ts05e7an.js";
|
|
24
24
|
import {
|
|
25
25
|
__require
|
|
26
26
|
} from "./tool-1yh8g550.js";
|
|
@@ -12481,7 +12481,7 @@ var resolveEntryPoint = (entryPoints, requested) => {
|
|
|
12481
12481
|
var resolveBinding = async (target) => {
|
|
12482
12482
|
const processKey = target.processKey.toLowerCase();
|
|
12483
12483
|
const folderKey = target.folderKey.toLowerCase();
|
|
12484
|
-
const { listVoiceEntryPoints } = await import("./cas-client-
|
|
12484
|
+
const { listVoiceEntryPoints } = await import("./cas-client-2gk8fd2k.js");
|
|
12485
12485
|
const [epError, entryPoints] = await catchError(listVoiceEntryPoints(processKey, folderKey));
|
|
12486
12486
|
if (epError) {
|
|
12487
12487
|
await failFromError(epError);
|
|
@@ -12497,7 +12497,7 @@ var resolveBinding = async (target) => {
|
|
|
12497
12497
|
var registerTrunksCommand = (program) => {
|
|
12498
12498
|
const trunks = program.command("trunks").description("Inspect the SIP trunks (phone numbers) configured for conversational voice.");
|
|
12499
12499
|
trunks.command("list").description("List the tenant's SIP trunks. Voice flows dial out from an outbound-enabled trunk's phone number (`inputs.from` on Create outgoing call); inbound-enabled trunks route incoming calls to a published process. Trunks are connected in Instance Management under Phone numbers.").option("--direction <direction>", "Only trunks enabled for this call direction: inbound or outbound (default: all trunks)", parseDirection).trackedAction(processContext, async (options) => {
|
|
12500
|
-
const { listSipTrunks } = await import("./cas-client-
|
|
12500
|
+
const { listSipTrunks } = await import("./cas-client-2gk8fd2k.js");
|
|
12501
12501
|
const [listError, trunks2] = await catchError(listSipTrunks(options.direction));
|
|
12502
12502
|
if (listError) {
|
|
12503
12503
|
await failFromError(listError);
|
|
@@ -12513,7 +12513,7 @@ var registerTrunksCommand = (program) => {
|
|
|
12513
12513
|
const plan = planAssign(options);
|
|
12514
12514
|
if (plan === null)
|
|
12515
12515
|
return;
|
|
12516
|
-
const { resolveSipTrunk, updateSipTrunkBinding } = await import("./cas-client-
|
|
12516
|
+
const { resolveSipTrunk, updateSipTrunkBinding } = await import("./cas-client-2gk8fd2k.js");
|
|
12517
12517
|
const [trunkError, trunk] = await catchError(resolveSipTrunk(trunkArg));
|
|
12518
12518
|
if (trunkError) {
|
|
12519
12519
|
await failFromError(trunkError);
|
package/dist/tool.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
metadata,
|
|
3
3
|
registerCommands
|
|
4
|
-
} from "./tool-
|
|
4
|
+
} from "./tool-vgafqfsp.js";
|
|
5
5
|
import"./tool-nkyhbf79.js";
|
|
6
|
-
import"./tool-
|
|
6
|
+
import"./tool-ts05e7an.js";
|
|
7
7
|
import"./tool-mpvp5rqs.js";
|
|
8
8
|
import"./tool-1yh8g550.js";
|
|
9
9
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/conversational-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": "Handle conversations with deployed UiPath conversational processes.",
|
|
6
7
|
"publishConfig": {
|
|
7
8
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -17,5 +18,5 @@
|
|
|
17
18
|
"files": [
|
|
18
19
|
"dist"
|
|
19
20
|
],
|
|
20
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "4e0a51e3ab2c9d89afd3d35a7b087a7fa58133a0"
|
|
21
22
|
}
|