@uipath/api-workflow-tool 1.202.1-preview.217 → 1.202.1-preview.238
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/executor-tool.js +1 -1
- package/dist/{index-qjp3k2xp.js → index-wmwh4a4m.js} +225 -8
- package/dist/index.js +2 -2
- package/dist/{node-72ea3kys.js → node-gfj12t7t.js} +225 -8
- package/dist/{packager-tool-j55qcxr7.js → packager-tool-dqnnvzg1.js} +225 -7
- package/dist/{packager-tool-kny49jen.js → packager-tool-m49btj1h.js} +7 -7
- package/dist/tool.js +2 -2
- package/package.json +2 -2
package/dist/executor-tool.js
CHANGED
|
@@ -10968,7 +10968,165 @@ class FilterImplicitLimitError extends Error {
|
|
|
10968
10968
|
this.instructions = "Pass --limit <n> to choose how many records the filter applies to. " + "To filter over all records, pass the command's maximum accepted --limit (see the option's description in --help).";
|
|
10969
10969
|
}
|
|
10970
10970
|
}
|
|
10971
|
-
function
|
|
10971
|
+
function countRecords(data) {
|
|
10972
|
+
if (Array.isArray(data))
|
|
10973
|
+
return data.length;
|
|
10974
|
+
return data == null ? 0 : 1;
|
|
10975
|
+
}
|
|
10976
|
+
function availableFields(data) {
|
|
10977
|
+
const records = Array.isArray(data) ? data : [data];
|
|
10978
|
+
const keys = new Set;
|
|
10979
|
+
for (const record of records) {
|
|
10980
|
+
if (record && typeof record === "object" && !Array.isArray(record)) {
|
|
10981
|
+
for (const key of Object.keys(record))
|
|
10982
|
+
keys.add(key);
|
|
10983
|
+
}
|
|
10984
|
+
}
|
|
10985
|
+
return [...keys];
|
|
10986
|
+
}
|
|
10987
|
+
function decodeQuotedIdentifier(whole, inner) {
|
|
10988
|
+
const [error, decoded] = catchError(() => JSON.parse(whole));
|
|
10989
|
+
if (!error && typeof decoded === "string")
|
|
10990
|
+
return decoded;
|
|
10991
|
+
return inner.replace(/\\(.)/g, "$1");
|
|
10992
|
+
}
|
|
10993
|
+
function referencedFields(filter) {
|
|
10994
|
+
const top = new Set;
|
|
10995
|
+
const nested = new Set;
|
|
10996
|
+
const withoutValueLiterals = filter.replace(/'(?:\\.|[^'\\])*'/g, " ").replace(/`(?:\\.|[^`\\])*`/g, " ");
|
|
10997
|
+
const isPathTail = (text, index) => text[index - 1] === "." && /[A-Za-z0-9_"]/.test(text[index - 2] ?? "");
|
|
10998
|
+
const quoted = [];
|
|
10999
|
+
const withoutLiterals = withoutValueLiterals.replace(/"((?:\\.|[^"\\])*)"/g, (whole, name, index) => {
|
|
11000
|
+
const isAlias = /^\s*:/.test(withoutValueLiterals.slice(index + whole.length));
|
|
11001
|
+
if (!isAlias) {
|
|
11002
|
+
quoted.push({
|
|
11003
|
+
name: decodeQuotedIdentifier(whole, name),
|
|
11004
|
+
index,
|
|
11005
|
+
tail: isPathTail(withoutValueLiterals, index)
|
|
11006
|
+
});
|
|
11007
|
+
}
|
|
11008
|
+
return `"${" ".repeat(whole.length - 2)}"`;
|
|
11009
|
+
});
|
|
11010
|
+
const descent = /[A-Za-z0-9_"]\s*[.[]/.exec(withoutLiterals);
|
|
11011
|
+
const rootEnd = descent ? descent.index + 1 : Number.POSITIVE_INFINITY;
|
|
11012
|
+
const place = (name, index, tail) => {
|
|
11013
|
+
if (tail || index >= rootEnd)
|
|
11014
|
+
nested.add(name);
|
|
11015
|
+
else
|
|
11016
|
+
top.add(name);
|
|
11017
|
+
};
|
|
11018
|
+
for (const entry of quoted)
|
|
11019
|
+
place(entry.name, entry.index, entry.tail);
|
|
11020
|
+
const identifiers = withoutLiterals.matchAll(/([A-Za-z_][A-Za-z0-9_]*)(\s*[:(])?/g);
|
|
11021
|
+
const reserved = new Set(["true", "false", "null", "and", "or", "not"]);
|
|
11022
|
+
for (const match of identifiers) {
|
|
11023
|
+
const [, name, trailing] = match;
|
|
11024
|
+
if (trailing || reserved.has(name))
|
|
11025
|
+
continue;
|
|
11026
|
+
place(name, match.index, isPathTail(withoutLiterals, match.index));
|
|
11027
|
+
}
|
|
11028
|
+
return {
|
|
11029
|
+
top: [...top],
|
|
11030
|
+
nested: [...nested].filter((name) => !top.has(name)),
|
|
11031
|
+
hasPredicate: /\[\s*\?/.test(withoutValueLiterals)
|
|
11032
|
+
};
|
|
11033
|
+
}
|
|
11034
|
+
function appearsBelowTopLevel(data, name) {
|
|
11035
|
+
let budget = 2000;
|
|
11036
|
+
const visit = (value, depth) => {
|
|
11037
|
+
if (budget-- <= 0 || depth > 4)
|
|
11038
|
+
return false;
|
|
11039
|
+
if (value === null || typeof value !== "object")
|
|
11040
|
+
return false;
|
|
11041
|
+
if (Array.isArray(value))
|
|
11042
|
+
return value.some((entry) => visit(entry, depth));
|
|
11043
|
+
const record = value;
|
|
11044
|
+
if (depth > 0 && Object.hasOwn(record, name))
|
|
11045
|
+
return true;
|
|
11046
|
+
return Object.values(record).some((entry) => visit(entry, depth + 1));
|
|
11047
|
+
};
|
|
11048
|
+
return visit(data, 0);
|
|
11049
|
+
}
|
|
11050
|
+
function alwaysNullKeys(records) {
|
|
11051
|
+
const objects = records.filter((r) => r != null && typeof r === "object" && !Array.isArray(r));
|
|
11052
|
+
if (objects.length === 0 || objects.length !== records.length)
|
|
11053
|
+
return [];
|
|
11054
|
+
const keys = [...new Set(objects.flatMap((o) => Object.keys(o)))];
|
|
11055
|
+
if (keys.length === 0)
|
|
11056
|
+
return [];
|
|
11057
|
+
const nullKeys = keys.filter((key) => objects.every((record) => record[key] === null));
|
|
11058
|
+
return nullKeys.length === keys.length ? nullKeys : [];
|
|
11059
|
+
}
|
|
11060
|
+
function carriesOnlyNulls(value) {
|
|
11061
|
+
if (value === null)
|
|
11062
|
+
return true;
|
|
11063
|
+
if (Array.isArray(value)) {
|
|
11064
|
+
return value.length > 0 && value.every(carriesOnlyNulls);
|
|
11065
|
+
}
|
|
11066
|
+
if (typeof value === "object" && value !== undefined) {
|
|
11067
|
+
const values = Object.values(value);
|
|
11068
|
+
return values.length > 0 && values.every(carriesOnlyNulls);
|
|
11069
|
+
}
|
|
11070
|
+
return false;
|
|
11071
|
+
}
|
|
11072
|
+
function nameList(names, cap2 = 12) {
|
|
11073
|
+
const shown = names.slice(0, cap2).map((n) => `\`${n}\``);
|
|
11074
|
+
const rest = names.length - shown.length;
|
|
11075
|
+
return shown.join(", ") + (rest > 0 ? `, and ${rest} more` : "");
|
|
11076
|
+
}
|
|
11077
|
+
function buildFilterWarning(filter, data, outcome) {
|
|
11078
|
+
const present = availableFields(data);
|
|
11079
|
+
const refs = referencedFields(filter);
|
|
11080
|
+
const unknown = refs.top.filter((name) => !present.includes(name) && !appearsBelowTopLevel(data, name));
|
|
11081
|
+
const unchecked = refs.nested.filter((name) => !present.includes(name));
|
|
11082
|
+
const count = countRecords(data);
|
|
11083
|
+
const scope = `${count} record(s)`;
|
|
11084
|
+
const isNotAField = (names) => `${nameList(names)} ${names.length === 1 ? "is not a field" : "are not fields"} on the ${scope} it read`;
|
|
11085
|
+
const soundness = unchecked.length > 0 ? `${nameList(unchecked)} ${unchecked.length === 1 ? "reads" : "read"} below the top level, so ${unchecked.length === 1 ? "it was" : "they were"} not checked against the record keys` : refs.top.length > 0 ? "every field it names exists" : "";
|
|
11086
|
+
const withSoundness = (base) => soundness ? `${base}, and ${soundness}` : base;
|
|
11087
|
+
let detail;
|
|
11088
|
+
let lede;
|
|
11089
|
+
if (outcome.kind === "null-elements") {
|
|
11090
|
+
lede = "returned only null values";
|
|
11091
|
+
const projected = `all ${outcome.count} of the elements it projected are null`;
|
|
11092
|
+
if (unknown.length > 0) {
|
|
11093
|
+
detail = `${projected}, because ${isNotAField(unknown)}`;
|
|
11094
|
+
} else if (unchecked.length > 0) {
|
|
11095
|
+
detail = withSoundness(projected);
|
|
11096
|
+
} else {
|
|
11097
|
+
detail = `${projected}, and every field it names exists — a multi-select list ` + `(\`[A, B]\`) reads each entry against \`Data\` itself, so on a list ` + `result use \`[].[A, B]\` or \`[].{a: A, b: B}\` to read the records`;
|
|
11098
|
+
}
|
|
11099
|
+
} else if (outcome.kind === "null-rows") {
|
|
11100
|
+
lede = "returned only null values";
|
|
11101
|
+
const projected = `every value it projected is null on all ${outcome.count} row(s)`;
|
|
11102
|
+
detail = unknown.length > 0 ? `${projected}, because ${isNotAField(unknown)}` : withSoundness(projected);
|
|
11103
|
+
} else if (outcome.kind === "null-values") {
|
|
11104
|
+
lede = "returned only null values";
|
|
11105
|
+
const projected = `every key it projected (${nameList(outcome.keys)}) is null`;
|
|
11106
|
+
const sameSet = unknown.length === outcome.keys.length && outcome.keys.every((k) => unknown.includes(k));
|
|
11107
|
+
if (sameSet) {
|
|
11108
|
+
detail = `${isNotAField(outcome.keys)}, so every key it projected is null`;
|
|
11109
|
+
} else if (unknown.length > 0) {
|
|
11110
|
+
detail = `${projected}, because ${isNotAField(unknown)}`;
|
|
11111
|
+
} else {
|
|
11112
|
+
detail = withSoundness(`${projected} on all ${scope}`);
|
|
11113
|
+
}
|
|
11114
|
+
} else {
|
|
11115
|
+
lede = "returned nothing";
|
|
11116
|
+
if (unknown.length > 0) {
|
|
11117
|
+
detail = isNotAField(unknown);
|
|
11118
|
+
} else {
|
|
11119
|
+
const selection = refs.hasPredicate ? "no record matched" : "the expression resolved to no value";
|
|
11120
|
+
detail = withSoundness(`${selection} — it read ${scope}`);
|
|
11121
|
+
}
|
|
11122
|
+
}
|
|
11123
|
+
const fields = present.length > 0 ? ` Available fields: ${nameList(present)}.` : "";
|
|
11124
|
+
return `--output-filter ${JSON.stringify(filter)} ${lede}: ${detail}.${fields}`;
|
|
11125
|
+
}
|
|
11126
|
+
function appendWarning(existing, note) {
|
|
11127
|
+
return existing ? `${existing} ${note}` : note;
|
|
11128
|
+
}
|
|
11129
|
+
function applyFilter(data, filter, onWarning) {
|
|
10972
11130
|
const codec = requireJmespath();
|
|
10973
11131
|
let result;
|
|
10974
11132
|
try {
|
|
@@ -10976,9 +11134,34 @@ function applyFilter(data, filter) {
|
|
|
10976
11134
|
} catch (err) {
|
|
10977
11135
|
throw new FilterEvaluationError(filter, err);
|
|
10978
11136
|
}
|
|
10979
|
-
|
|
11137
|
+
const inputCount = countRecords(data);
|
|
11138
|
+
const warn = (outcome) => {
|
|
11139
|
+
if (inputCount === 0)
|
|
11140
|
+
return;
|
|
11141
|
+
const note = buildFilterWarning(filter, data, outcome);
|
|
11142
|
+
getOutputSink().writeErr(`[WARN] ${note}
|
|
11143
|
+
`);
|
|
11144
|
+
onWarning?.(note);
|
|
11145
|
+
};
|
|
11146
|
+
const warnIfAllNull = (records) => {
|
|
11147
|
+
const keys = alwaysNullKeys(records);
|
|
11148
|
+
if (keys.length > 0)
|
|
11149
|
+
warn({ kind: "null-values", keys });
|
|
11150
|
+
};
|
|
11151
|
+
if (result == null) {
|
|
11152
|
+
warn({ kind: "empty" });
|
|
10980
11153
|
return [];
|
|
11154
|
+
}
|
|
10981
11155
|
if (Array.isArray(result)) {
|
|
11156
|
+
if (result.length === 0) {
|
|
11157
|
+
warn({ kind: "empty" });
|
|
11158
|
+
} else if (result.every((entry) => entry === null)) {
|
|
11159
|
+
warn({ kind: "null-elements", count: result.length });
|
|
11160
|
+
} else if (result.every((entry) => Array.isArray(entry)) && carriesOnlyNulls(result)) {
|
|
11161
|
+
warn({ kind: "null-rows", count: result.length });
|
|
11162
|
+
} else {
|
|
11163
|
+
warnIfAllNull(result);
|
|
11164
|
+
}
|
|
10982
11165
|
if (result.length > 0 && typeof result[0] !== "object") {
|
|
10983
11166
|
const fieldMatch = filter.match(/\.(\w+)$/);
|
|
10984
11167
|
const key = fieldMatch ? fieldMatch[1] : "Value";
|
|
@@ -10986,10 +11169,30 @@ function applyFilter(data, filter) {
|
|
|
10986
11169
|
}
|
|
10987
11170
|
return result;
|
|
10988
11171
|
}
|
|
10989
|
-
if (typeof result === "object")
|
|
11172
|
+
if (typeof result === "object") {
|
|
11173
|
+
warnIfAllNull([result]);
|
|
10990
11174
|
return result;
|
|
11175
|
+
}
|
|
10991
11176
|
return { Value: result };
|
|
10992
11177
|
}
|
|
11178
|
+
function filterFailureData(envelope) {
|
|
11179
|
+
const filter = getOutputFilter();
|
|
11180
|
+
const data = envelope.Data;
|
|
11181
|
+
if (!filter || data == null)
|
|
11182
|
+
return;
|
|
11183
|
+
let note;
|
|
11184
|
+
const [filterError, filtered] = catchError(() => applyFilter(data, filter, (n) => {
|
|
11185
|
+
note = n;
|
|
11186
|
+
}));
|
|
11187
|
+
if (filterError) {
|
|
11188
|
+
envelope.Warning = appendWarning(envelope.Warning, `--output-filter was not applied, so Data is shown in full: ${filterError.message}`);
|
|
11189
|
+
return;
|
|
11190
|
+
}
|
|
11191
|
+
envelope.Data = filtered;
|
|
11192
|
+
if (note) {
|
|
11193
|
+
envelope.Warning = appendWarning(envelope.Warning, note);
|
|
11194
|
+
}
|
|
11195
|
+
}
|
|
10993
11196
|
function defaultErrorCodeForResult(result) {
|
|
10994
11197
|
switch (result) {
|
|
10995
11198
|
case RESULTS.AuthenticationError:
|
|
@@ -11072,8 +11275,14 @@ var OutputFormatter;
|
|
|
11072
11275
|
}
|
|
11073
11276
|
const filter = getOutputFilter();
|
|
11074
11277
|
if (filter) {
|
|
11075
|
-
|
|
11278
|
+
let note;
|
|
11279
|
+
const filtered = applyFilter(data.Data, filter, (n) => {
|
|
11280
|
+
note = n;
|
|
11281
|
+
});
|
|
11076
11282
|
data.Data = normalize ? normalizeDataKeys(filtered, verbatim, subtrees && { refs: subtrees.refs, mode: "skip" }) : filtered;
|
|
11283
|
+
if (note) {
|
|
11284
|
+
data.Warning = appendWarning(data.Warning, note);
|
|
11285
|
+
}
|
|
11077
11286
|
}
|
|
11078
11287
|
logOutput(normalizeOutputKeys(data), getOutputFormat(), options?.tableRowStyle);
|
|
11079
11288
|
}
|
|
@@ -11101,6 +11310,7 @@ var OutputFormatter;
|
|
|
11101
11310
|
delete envelope.TelemetryErrorClass;
|
|
11102
11311
|
delete envelope.TelemetryTerminalOutcome;
|
|
11103
11312
|
delete envelope.TelemetryTerminalSignal;
|
|
11313
|
+
filterFailureData(envelope);
|
|
11104
11314
|
if (!suppressTelemetry) {
|
|
11105
11315
|
telemetry.trackEvent(CommonTelemetryEvents.Error, {
|
|
11106
11316
|
result: data.Result,
|
|
@@ -11149,13 +11359,20 @@ var OutputFormatter;
|
|
|
11149
11359
|
OutputFormatter2.log = log;
|
|
11150
11360
|
function formatToString(data) {
|
|
11151
11361
|
const filter = getOutputFilter();
|
|
11362
|
+
const envelope = data;
|
|
11152
11363
|
if ("Data" in data && data.Data != null) {
|
|
11153
11364
|
data.Data = normalizeDataKeys(data.Data);
|
|
11154
11365
|
if (filter) {
|
|
11155
|
-
|
|
11366
|
+
let note;
|
|
11367
|
+
data.Data = normalizeDataKeys(applyFilter(data.Data, filter, (n) => {
|
|
11368
|
+
note = n;
|
|
11369
|
+
}));
|
|
11370
|
+
if (note) {
|
|
11371
|
+
envelope.Warning = appendWarning(envelope.Warning, note);
|
|
11372
|
+
}
|
|
11156
11373
|
}
|
|
11157
11374
|
}
|
|
11158
|
-
const output = normalizeOutputKeys(
|
|
11375
|
+
const output = normalizeOutputKeys(envelope);
|
|
11159
11376
|
const lines = [];
|
|
11160
11377
|
const sink = getOutputSink();
|
|
11161
11378
|
printOutput(output, getOutputFormat(), (msg) => {
|
|
@@ -12247,7 +12464,7 @@ function addSdkUserAgentHeader(headers, userAgent) {
|
|
|
12247
12464
|
var package_default = {
|
|
12248
12465
|
name: "@uipath/project-packager",
|
|
12249
12466
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
12250
|
-
version: "1.202.1-preview.
|
|
12467
|
+
version: "1.202.1-preview.238",
|
|
12251
12468
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
12252
12469
|
type: "module",
|
|
12253
12470
|
main: "./dist/index.js",
|
|
@@ -13501,4 +13718,4 @@ export {
|
|
|
13501
13718
|
signNupkgsAsync
|
|
13502
13719
|
};
|
|
13503
13720
|
|
|
13504
|
-
//# debugId=
|
|
13721
|
+
//# debugId=D33AE8B026B2ED4A64756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
metadata,
|
|
4
4
|
registerCommands
|
|
5
|
-
} from "./packager-tool-
|
|
5
|
+
} from "./packager-tool-m49btj1h.js";
|
|
6
6
|
import"./packager-tool-m6ddy2t4.js";
|
|
7
7
|
import"./packager-tool-4vt21dnn.js";
|
|
8
8
|
import {
|
|
9
9
|
Command
|
|
10
|
-
} from "./packager-tool-
|
|
10
|
+
} from "./packager-tool-dqnnvzg1.js";
|
|
11
11
|
import"./packager-tool-d3w0wn6k.js";
|
|
12
12
|
import"./packager-tool-1de529jm.js";
|
|
13
13
|
|
|
@@ -11872,7 +11872,165 @@ class FilterImplicitLimitError extends Error {
|
|
|
11872
11872
|
this.instructions = "Pass --limit <n> to choose how many records the filter applies to. " + "To filter over all records, pass the command's maximum accepted --limit (see the option's description in --help).";
|
|
11873
11873
|
}
|
|
11874
11874
|
}
|
|
11875
|
-
function
|
|
11875
|
+
function countRecords(data) {
|
|
11876
|
+
if (Array.isArray(data))
|
|
11877
|
+
return data.length;
|
|
11878
|
+
return data == null ? 0 : 1;
|
|
11879
|
+
}
|
|
11880
|
+
function availableFields(data) {
|
|
11881
|
+
const records = Array.isArray(data) ? data : [data];
|
|
11882
|
+
const keys = new Set;
|
|
11883
|
+
for (const record of records) {
|
|
11884
|
+
if (record && typeof record === "object" && !Array.isArray(record)) {
|
|
11885
|
+
for (const key of Object.keys(record))
|
|
11886
|
+
keys.add(key);
|
|
11887
|
+
}
|
|
11888
|
+
}
|
|
11889
|
+
return [...keys];
|
|
11890
|
+
}
|
|
11891
|
+
function decodeQuotedIdentifier(whole, inner) {
|
|
11892
|
+
const [error, decoded] = catchError(() => JSON.parse(whole));
|
|
11893
|
+
if (!error && typeof decoded === "string")
|
|
11894
|
+
return decoded;
|
|
11895
|
+
return inner.replace(/\\(.)/g, "$1");
|
|
11896
|
+
}
|
|
11897
|
+
function referencedFields(filter) {
|
|
11898
|
+
const top = new Set;
|
|
11899
|
+
const nested = new Set;
|
|
11900
|
+
const withoutValueLiterals = filter.replace(/'(?:\\.|[^'\\])*'/g, " ").replace(/`(?:\\.|[^`\\])*`/g, " ");
|
|
11901
|
+
const isPathTail = (text, index) => text[index - 1] === "." && /[A-Za-z0-9_"]/.test(text[index - 2] ?? "");
|
|
11902
|
+
const quoted = [];
|
|
11903
|
+
const withoutLiterals = withoutValueLiterals.replace(/"((?:\\.|[^"\\])*)"/g, (whole, name, index) => {
|
|
11904
|
+
const isAlias = /^\s*:/.test(withoutValueLiterals.slice(index + whole.length));
|
|
11905
|
+
if (!isAlias) {
|
|
11906
|
+
quoted.push({
|
|
11907
|
+
name: decodeQuotedIdentifier(whole, name),
|
|
11908
|
+
index,
|
|
11909
|
+
tail: isPathTail(withoutValueLiterals, index)
|
|
11910
|
+
});
|
|
11911
|
+
}
|
|
11912
|
+
return `"${" ".repeat(whole.length - 2)}"`;
|
|
11913
|
+
});
|
|
11914
|
+
const descent = /[A-Za-z0-9_"]\s*[.[]/.exec(withoutLiterals);
|
|
11915
|
+
const rootEnd = descent ? descent.index + 1 : Number.POSITIVE_INFINITY;
|
|
11916
|
+
const place = (name, index, tail) => {
|
|
11917
|
+
if (tail || index >= rootEnd)
|
|
11918
|
+
nested.add(name);
|
|
11919
|
+
else
|
|
11920
|
+
top.add(name);
|
|
11921
|
+
};
|
|
11922
|
+
for (const entry of quoted)
|
|
11923
|
+
place(entry.name, entry.index, entry.tail);
|
|
11924
|
+
const identifiers = withoutLiterals.matchAll(/([A-Za-z_][A-Za-z0-9_]*)(\s*[:(])?/g);
|
|
11925
|
+
const reserved = new Set(["true", "false", "null", "and", "or", "not"]);
|
|
11926
|
+
for (const match of identifiers) {
|
|
11927
|
+
const [, name, trailing] = match;
|
|
11928
|
+
if (trailing || reserved.has(name))
|
|
11929
|
+
continue;
|
|
11930
|
+
place(name, match.index, isPathTail(withoutLiterals, match.index));
|
|
11931
|
+
}
|
|
11932
|
+
return {
|
|
11933
|
+
top: [...top],
|
|
11934
|
+
nested: [...nested].filter((name) => !top.has(name)),
|
|
11935
|
+
hasPredicate: /\[\s*\?/.test(withoutValueLiterals)
|
|
11936
|
+
};
|
|
11937
|
+
}
|
|
11938
|
+
function appearsBelowTopLevel(data, name) {
|
|
11939
|
+
let budget = 2000;
|
|
11940
|
+
const visit = (value, depth) => {
|
|
11941
|
+
if (budget-- <= 0 || depth > 4)
|
|
11942
|
+
return false;
|
|
11943
|
+
if (value === null || typeof value !== "object")
|
|
11944
|
+
return false;
|
|
11945
|
+
if (Array.isArray(value))
|
|
11946
|
+
return value.some((entry) => visit(entry, depth));
|
|
11947
|
+
const record = value;
|
|
11948
|
+
if (depth > 0 && Object.hasOwn(record, name))
|
|
11949
|
+
return true;
|
|
11950
|
+
return Object.values(record).some((entry) => visit(entry, depth + 1));
|
|
11951
|
+
};
|
|
11952
|
+
return visit(data, 0);
|
|
11953
|
+
}
|
|
11954
|
+
function alwaysNullKeys(records) {
|
|
11955
|
+
const objects = records.filter((r) => r != null && typeof r === "object" && !Array.isArray(r));
|
|
11956
|
+
if (objects.length === 0 || objects.length !== records.length)
|
|
11957
|
+
return [];
|
|
11958
|
+
const keys = [...new Set(objects.flatMap((o) => Object.keys(o)))];
|
|
11959
|
+
if (keys.length === 0)
|
|
11960
|
+
return [];
|
|
11961
|
+
const nullKeys = keys.filter((key) => objects.every((record) => record[key] === null));
|
|
11962
|
+
return nullKeys.length === keys.length ? nullKeys : [];
|
|
11963
|
+
}
|
|
11964
|
+
function carriesOnlyNulls(value) {
|
|
11965
|
+
if (value === null)
|
|
11966
|
+
return true;
|
|
11967
|
+
if (Array.isArray(value)) {
|
|
11968
|
+
return value.length > 0 && value.every(carriesOnlyNulls);
|
|
11969
|
+
}
|
|
11970
|
+
if (typeof value === "object" && value !== undefined) {
|
|
11971
|
+
const values = Object.values(value);
|
|
11972
|
+
return values.length > 0 && values.every(carriesOnlyNulls);
|
|
11973
|
+
}
|
|
11974
|
+
return false;
|
|
11975
|
+
}
|
|
11976
|
+
function nameList(names, cap2 = 12) {
|
|
11977
|
+
const shown = names.slice(0, cap2).map((n) => `\`${n}\``);
|
|
11978
|
+
const rest = names.length - shown.length;
|
|
11979
|
+
return shown.join(", ") + (rest > 0 ? `, and ${rest} more` : "");
|
|
11980
|
+
}
|
|
11981
|
+
function buildFilterWarning(filter, data, outcome) {
|
|
11982
|
+
const present = availableFields(data);
|
|
11983
|
+
const refs = referencedFields(filter);
|
|
11984
|
+
const unknown = refs.top.filter((name) => !present.includes(name) && !appearsBelowTopLevel(data, name));
|
|
11985
|
+
const unchecked = refs.nested.filter((name) => !present.includes(name));
|
|
11986
|
+
const count = countRecords(data);
|
|
11987
|
+
const scope = `${count} record(s)`;
|
|
11988
|
+
const isNotAField = (names) => `${nameList(names)} ${names.length === 1 ? "is not a field" : "are not fields"} on the ${scope} it read`;
|
|
11989
|
+
const soundness = unchecked.length > 0 ? `${nameList(unchecked)} ${unchecked.length === 1 ? "reads" : "read"} below the top level, so ${unchecked.length === 1 ? "it was" : "they were"} not checked against the record keys` : refs.top.length > 0 ? "every field it names exists" : "";
|
|
11990
|
+
const withSoundness = (base) => soundness ? `${base}, and ${soundness}` : base;
|
|
11991
|
+
let detail;
|
|
11992
|
+
let lede;
|
|
11993
|
+
if (outcome.kind === "null-elements") {
|
|
11994
|
+
lede = "returned only null values";
|
|
11995
|
+
const projected = `all ${outcome.count} of the elements it projected are null`;
|
|
11996
|
+
if (unknown.length > 0) {
|
|
11997
|
+
detail = `${projected}, because ${isNotAField(unknown)}`;
|
|
11998
|
+
} else if (unchecked.length > 0) {
|
|
11999
|
+
detail = withSoundness(projected);
|
|
12000
|
+
} else {
|
|
12001
|
+
detail = `${projected}, and every field it names exists — a multi-select list ` + `(\`[A, B]\`) reads each entry against \`Data\` itself, so on a list ` + `result use \`[].[A, B]\` or \`[].{a: A, b: B}\` to read the records`;
|
|
12002
|
+
}
|
|
12003
|
+
} else if (outcome.kind === "null-rows") {
|
|
12004
|
+
lede = "returned only null values";
|
|
12005
|
+
const projected = `every value it projected is null on all ${outcome.count} row(s)`;
|
|
12006
|
+
detail = unknown.length > 0 ? `${projected}, because ${isNotAField(unknown)}` : withSoundness(projected);
|
|
12007
|
+
} else if (outcome.kind === "null-values") {
|
|
12008
|
+
lede = "returned only null values";
|
|
12009
|
+
const projected = `every key it projected (${nameList(outcome.keys)}) is null`;
|
|
12010
|
+
const sameSet = unknown.length === outcome.keys.length && outcome.keys.every((k) => unknown.includes(k));
|
|
12011
|
+
if (sameSet) {
|
|
12012
|
+
detail = `${isNotAField(outcome.keys)}, so every key it projected is null`;
|
|
12013
|
+
} else if (unknown.length > 0) {
|
|
12014
|
+
detail = `${projected}, because ${isNotAField(unknown)}`;
|
|
12015
|
+
} else {
|
|
12016
|
+
detail = withSoundness(`${projected} on all ${scope}`);
|
|
12017
|
+
}
|
|
12018
|
+
} else {
|
|
12019
|
+
lede = "returned nothing";
|
|
12020
|
+
if (unknown.length > 0) {
|
|
12021
|
+
detail = isNotAField(unknown);
|
|
12022
|
+
} else {
|
|
12023
|
+
const selection = refs.hasPredicate ? "no record matched" : "the expression resolved to no value";
|
|
12024
|
+
detail = withSoundness(`${selection} — it read ${scope}`);
|
|
12025
|
+
}
|
|
12026
|
+
}
|
|
12027
|
+
const fields = present.length > 0 ? ` Available fields: ${nameList(present)}.` : "";
|
|
12028
|
+
return `--output-filter ${JSON.stringify(filter)} ${lede}: ${detail}.${fields}`;
|
|
12029
|
+
}
|
|
12030
|
+
function appendWarning(existing, note) {
|
|
12031
|
+
return existing ? `${existing} ${note}` : note;
|
|
12032
|
+
}
|
|
12033
|
+
function applyFilter(data, filter, onWarning) {
|
|
11876
12034
|
const codec = requireJmespath();
|
|
11877
12035
|
let result;
|
|
11878
12036
|
try {
|
|
@@ -11880,9 +12038,34 @@ function applyFilter(data, filter) {
|
|
|
11880
12038
|
} catch (err) {
|
|
11881
12039
|
throw new FilterEvaluationError(filter, err);
|
|
11882
12040
|
}
|
|
11883
|
-
|
|
12041
|
+
const inputCount = countRecords(data);
|
|
12042
|
+
const warn = (outcome) => {
|
|
12043
|
+
if (inputCount === 0)
|
|
12044
|
+
return;
|
|
12045
|
+
const note = buildFilterWarning(filter, data, outcome);
|
|
12046
|
+
getOutputSink().writeErr(`[WARN] ${note}
|
|
12047
|
+
`);
|
|
12048
|
+
onWarning?.(note);
|
|
12049
|
+
};
|
|
12050
|
+
const warnIfAllNull = (records) => {
|
|
12051
|
+
const keys = alwaysNullKeys(records);
|
|
12052
|
+
if (keys.length > 0)
|
|
12053
|
+
warn({ kind: "null-values", keys });
|
|
12054
|
+
};
|
|
12055
|
+
if (result == null) {
|
|
12056
|
+
warn({ kind: "empty" });
|
|
11884
12057
|
return [];
|
|
12058
|
+
}
|
|
11885
12059
|
if (Array.isArray(result)) {
|
|
12060
|
+
if (result.length === 0) {
|
|
12061
|
+
warn({ kind: "empty" });
|
|
12062
|
+
} else if (result.every((entry) => entry === null)) {
|
|
12063
|
+
warn({ kind: "null-elements", count: result.length });
|
|
12064
|
+
} else if (result.every((entry) => Array.isArray(entry)) && carriesOnlyNulls(result)) {
|
|
12065
|
+
warn({ kind: "null-rows", count: result.length });
|
|
12066
|
+
} else {
|
|
12067
|
+
warnIfAllNull(result);
|
|
12068
|
+
}
|
|
11886
12069
|
if (result.length > 0 && typeof result[0] !== "object") {
|
|
11887
12070
|
const fieldMatch = filter.match(/\.(\w+)$/);
|
|
11888
12071
|
const key = fieldMatch ? fieldMatch[1] : "Value";
|
|
@@ -11890,10 +12073,30 @@ function applyFilter(data, filter) {
|
|
|
11890
12073
|
}
|
|
11891
12074
|
return result;
|
|
11892
12075
|
}
|
|
11893
|
-
if (typeof result === "object")
|
|
12076
|
+
if (typeof result === "object") {
|
|
12077
|
+
warnIfAllNull([result]);
|
|
11894
12078
|
return result;
|
|
12079
|
+
}
|
|
11895
12080
|
return { Value: result };
|
|
11896
12081
|
}
|
|
12082
|
+
function filterFailureData(envelope) {
|
|
12083
|
+
const filter = getOutputFilter();
|
|
12084
|
+
const data = envelope.Data;
|
|
12085
|
+
if (!filter || data == null)
|
|
12086
|
+
return;
|
|
12087
|
+
let note;
|
|
12088
|
+
const [filterError, filtered] = catchError(() => applyFilter(data, filter, (n) => {
|
|
12089
|
+
note = n;
|
|
12090
|
+
}));
|
|
12091
|
+
if (filterError) {
|
|
12092
|
+
envelope.Warning = appendWarning(envelope.Warning, `--output-filter was not applied, so Data is shown in full: ${filterError.message}`);
|
|
12093
|
+
return;
|
|
12094
|
+
}
|
|
12095
|
+
envelope.Data = filtered;
|
|
12096
|
+
if (note) {
|
|
12097
|
+
envelope.Warning = appendWarning(envelope.Warning, note);
|
|
12098
|
+
}
|
|
12099
|
+
}
|
|
11897
12100
|
function defaultErrorCodeForResult(result) {
|
|
11898
12101
|
switch (result) {
|
|
11899
12102
|
case RESULTS.AuthenticationError:
|
|
@@ -11976,8 +12179,14 @@ var OutputFormatter;
|
|
|
11976
12179
|
}
|
|
11977
12180
|
const filter = getOutputFilter();
|
|
11978
12181
|
if (filter) {
|
|
11979
|
-
|
|
12182
|
+
let note;
|
|
12183
|
+
const filtered = applyFilter(data.Data, filter, (n) => {
|
|
12184
|
+
note = n;
|
|
12185
|
+
});
|
|
11980
12186
|
data.Data = normalize ? normalizeDataKeys(filtered, verbatim, subtrees && { refs: subtrees.refs, mode: "skip" }) : filtered;
|
|
12187
|
+
if (note) {
|
|
12188
|
+
data.Warning = appendWarning(data.Warning, note);
|
|
12189
|
+
}
|
|
11981
12190
|
}
|
|
11982
12191
|
logOutput(normalizeOutputKeys(data), getOutputFormat(), options?.tableRowStyle);
|
|
11983
12192
|
}
|
|
@@ -12005,6 +12214,7 @@ var OutputFormatter;
|
|
|
12005
12214
|
delete envelope.TelemetryErrorClass;
|
|
12006
12215
|
delete envelope.TelemetryTerminalOutcome;
|
|
12007
12216
|
delete envelope.TelemetryTerminalSignal;
|
|
12217
|
+
filterFailureData(envelope);
|
|
12008
12218
|
if (!suppressTelemetry) {
|
|
12009
12219
|
telemetry.trackEvent(CommonTelemetryEvents.Error, {
|
|
12010
12220
|
result: data.Result,
|
|
@@ -12053,13 +12263,20 @@ var OutputFormatter;
|
|
|
12053
12263
|
OutputFormatter2.log = log;
|
|
12054
12264
|
function formatToString(data) {
|
|
12055
12265
|
const filter = getOutputFilter();
|
|
12266
|
+
const envelope = data;
|
|
12056
12267
|
if ("Data" in data && data.Data != null) {
|
|
12057
12268
|
data.Data = normalizeDataKeys(data.Data);
|
|
12058
12269
|
if (filter) {
|
|
12059
|
-
|
|
12270
|
+
let note;
|
|
12271
|
+
data.Data = normalizeDataKeys(applyFilter(data.Data, filter, (n) => {
|
|
12272
|
+
note = n;
|
|
12273
|
+
}));
|
|
12274
|
+
if (note) {
|
|
12275
|
+
envelope.Warning = appendWarning(envelope.Warning, note);
|
|
12276
|
+
}
|
|
12060
12277
|
}
|
|
12061
12278
|
}
|
|
12062
|
-
const output = normalizeOutputKeys(
|
|
12279
|
+
const output = normalizeOutputKeys(envelope);
|
|
12063
12280
|
const lines = [];
|
|
12064
12281
|
const sink = getOutputSink();
|
|
12065
12282
|
printOutput(output, getOutputFormat(), (msg) => {
|
|
@@ -14070,7 +14287,7 @@ function addSdkUserAgentHeader(headers, userAgent) {
|
|
|
14070
14287
|
var package_default = {
|
|
14071
14288
|
name: "@uipath/project-packager",
|
|
14072
14289
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
14073
|
-
version: "1.202.1-preview.
|
|
14290
|
+
version: "1.202.1-preview.238",
|
|
14074
14291
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
14075
14292
|
type: "module",
|
|
14076
14293
|
main: "./dist/index.js",
|
|
@@ -14521,4 +14738,4 @@ export {
|
|
|
14521
14738
|
signNupkgsAsync
|
|
14522
14739
|
};
|
|
14523
14740
|
|
|
14524
|
-
//# debugId=
|
|
14741
|
+
//# debugId=F91B962DD7EB231F64756E2164756E21
|
|
@@ -29556,6 +29556,7 @@ class SuccessOutput {
|
|
|
29556
29556
|
Data;
|
|
29557
29557
|
Pagination;
|
|
29558
29558
|
Instructions;
|
|
29559
|
+
Warning;
|
|
29559
29560
|
Log;
|
|
29560
29561
|
constructor(code, data) {
|
|
29561
29562
|
this.Code = code;
|
|
@@ -29949,7 +29950,165 @@ class FilterImplicitLimitError extends Error {
|
|
|
29949
29950
|
this.instructions = "Pass --limit <n> to choose how many records the filter applies to. " + "To filter over all records, pass the command's maximum accepted --limit (see the option's description in --help).";
|
|
29950
29951
|
}
|
|
29951
29952
|
}
|
|
29952
|
-
function
|
|
29953
|
+
function countRecords(data) {
|
|
29954
|
+
if (Array.isArray(data))
|
|
29955
|
+
return data.length;
|
|
29956
|
+
return data == null ? 0 : 1;
|
|
29957
|
+
}
|
|
29958
|
+
function availableFields(data) {
|
|
29959
|
+
const records = Array.isArray(data) ? data : [data];
|
|
29960
|
+
const keys = new Set;
|
|
29961
|
+
for (const record of records) {
|
|
29962
|
+
if (record && typeof record === "object" && !Array.isArray(record)) {
|
|
29963
|
+
for (const key of Object.keys(record))
|
|
29964
|
+
keys.add(key);
|
|
29965
|
+
}
|
|
29966
|
+
}
|
|
29967
|
+
return [...keys];
|
|
29968
|
+
}
|
|
29969
|
+
function decodeQuotedIdentifier(whole, inner) {
|
|
29970
|
+
const [error, decoded] = catchError(() => JSON.parse(whole));
|
|
29971
|
+
if (!error && typeof decoded === "string")
|
|
29972
|
+
return decoded;
|
|
29973
|
+
return inner.replace(/\\(.)/g, "$1");
|
|
29974
|
+
}
|
|
29975
|
+
function referencedFields(filter) {
|
|
29976
|
+
const top = new Set;
|
|
29977
|
+
const nested = new Set;
|
|
29978
|
+
const withoutValueLiterals = filter.replace(/'(?:\\.|[^'\\])*'/g, " ").replace(/`(?:\\.|[^`\\])*`/g, " ");
|
|
29979
|
+
const isPathTail = (text, index) => text[index - 1] === "." && /[A-Za-z0-9_"]/.test(text[index - 2] ?? "");
|
|
29980
|
+
const quoted = [];
|
|
29981
|
+
const withoutLiterals = withoutValueLiterals.replace(/"((?:\\.|[^"\\])*)"/g, (whole, name, index) => {
|
|
29982
|
+
const isAlias = /^\s*:/.test(withoutValueLiterals.slice(index + whole.length));
|
|
29983
|
+
if (!isAlias) {
|
|
29984
|
+
quoted.push({
|
|
29985
|
+
name: decodeQuotedIdentifier(whole, name),
|
|
29986
|
+
index,
|
|
29987
|
+
tail: isPathTail(withoutValueLiterals, index)
|
|
29988
|
+
});
|
|
29989
|
+
}
|
|
29990
|
+
return `"${" ".repeat(whole.length - 2)}"`;
|
|
29991
|
+
});
|
|
29992
|
+
const descent = /[A-Za-z0-9_"]\s*[.[]/.exec(withoutLiterals);
|
|
29993
|
+
const rootEnd = descent ? descent.index + 1 : Number.POSITIVE_INFINITY;
|
|
29994
|
+
const place = (name, index, tail) => {
|
|
29995
|
+
if (tail || index >= rootEnd)
|
|
29996
|
+
nested.add(name);
|
|
29997
|
+
else
|
|
29998
|
+
top.add(name);
|
|
29999
|
+
};
|
|
30000
|
+
for (const entry of quoted)
|
|
30001
|
+
place(entry.name, entry.index, entry.tail);
|
|
30002
|
+
const identifiers = withoutLiterals.matchAll(/([A-Za-z_][A-Za-z0-9_]*)(\s*[:(])?/g);
|
|
30003
|
+
const reserved = new Set(["true", "false", "null", "and", "or", "not"]);
|
|
30004
|
+
for (const match of identifiers) {
|
|
30005
|
+
const [, name, trailing] = match;
|
|
30006
|
+
if (trailing || reserved.has(name))
|
|
30007
|
+
continue;
|
|
30008
|
+
place(name, match.index, isPathTail(withoutLiterals, match.index));
|
|
30009
|
+
}
|
|
30010
|
+
return {
|
|
30011
|
+
top: [...top],
|
|
30012
|
+
nested: [...nested].filter((name) => !top.has(name)),
|
|
30013
|
+
hasPredicate: /\[\s*\?/.test(withoutValueLiterals)
|
|
30014
|
+
};
|
|
30015
|
+
}
|
|
30016
|
+
function appearsBelowTopLevel(data, name) {
|
|
30017
|
+
let budget = 2000;
|
|
30018
|
+
const visit = (value, depth) => {
|
|
30019
|
+
if (budget-- <= 0 || depth > 4)
|
|
30020
|
+
return false;
|
|
30021
|
+
if (value === null || typeof value !== "object")
|
|
30022
|
+
return false;
|
|
30023
|
+
if (Array.isArray(value))
|
|
30024
|
+
return value.some((entry) => visit(entry, depth));
|
|
30025
|
+
const record = value;
|
|
30026
|
+
if (depth > 0 && Object.hasOwn(record, name))
|
|
30027
|
+
return true;
|
|
30028
|
+
return Object.values(record).some((entry) => visit(entry, depth + 1));
|
|
30029
|
+
};
|
|
30030
|
+
return visit(data, 0);
|
|
30031
|
+
}
|
|
30032
|
+
function alwaysNullKeys(records) {
|
|
30033
|
+
const objects = records.filter((r) => r != null && typeof r === "object" && !Array.isArray(r));
|
|
30034
|
+
if (objects.length === 0 || objects.length !== records.length)
|
|
30035
|
+
return [];
|
|
30036
|
+
const keys = [...new Set(objects.flatMap((o) => Object.keys(o)))];
|
|
30037
|
+
if (keys.length === 0)
|
|
30038
|
+
return [];
|
|
30039
|
+
const nullKeys = keys.filter((key) => objects.every((record) => record[key] === null));
|
|
30040
|
+
return nullKeys.length === keys.length ? nullKeys : [];
|
|
30041
|
+
}
|
|
30042
|
+
function carriesOnlyNulls(value) {
|
|
30043
|
+
if (value === null)
|
|
30044
|
+
return true;
|
|
30045
|
+
if (Array.isArray(value)) {
|
|
30046
|
+
return value.length > 0 && value.every(carriesOnlyNulls);
|
|
30047
|
+
}
|
|
30048
|
+
if (typeof value === "object" && value !== undefined) {
|
|
30049
|
+
const values = Object.values(value);
|
|
30050
|
+
return values.length > 0 && values.every(carriesOnlyNulls);
|
|
30051
|
+
}
|
|
30052
|
+
return false;
|
|
30053
|
+
}
|
|
30054
|
+
function nameList(names, cap2 = 12) {
|
|
30055
|
+
const shown = names.slice(0, cap2).map((n) => `\`${n}\``);
|
|
30056
|
+
const rest = names.length - shown.length;
|
|
30057
|
+
return shown.join(", ") + (rest > 0 ? `, and ${rest} more` : "");
|
|
30058
|
+
}
|
|
30059
|
+
function buildFilterWarning(filter, data, outcome) {
|
|
30060
|
+
const present = availableFields(data);
|
|
30061
|
+
const refs = referencedFields(filter);
|
|
30062
|
+
const unknown = refs.top.filter((name) => !present.includes(name) && !appearsBelowTopLevel(data, name));
|
|
30063
|
+
const unchecked = refs.nested.filter((name) => !present.includes(name));
|
|
30064
|
+
const count = countRecords(data);
|
|
30065
|
+
const scope = `${count} record(s)`;
|
|
30066
|
+
const isNotAField = (names) => `${nameList(names)} ${names.length === 1 ? "is not a field" : "are not fields"} on the ${scope} it read`;
|
|
30067
|
+
const soundness = unchecked.length > 0 ? `${nameList(unchecked)} ${unchecked.length === 1 ? "reads" : "read"} below the top level, so ${unchecked.length === 1 ? "it was" : "they were"} not checked against the record keys` : refs.top.length > 0 ? "every field it names exists" : "";
|
|
30068
|
+
const withSoundness = (base) => soundness ? `${base}, and ${soundness}` : base;
|
|
30069
|
+
let detail;
|
|
30070
|
+
let lede;
|
|
30071
|
+
if (outcome.kind === "null-elements") {
|
|
30072
|
+
lede = "returned only null values";
|
|
30073
|
+
const projected = `all ${outcome.count} of the elements it projected are null`;
|
|
30074
|
+
if (unknown.length > 0) {
|
|
30075
|
+
detail = `${projected}, because ${isNotAField(unknown)}`;
|
|
30076
|
+
} else if (unchecked.length > 0) {
|
|
30077
|
+
detail = withSoundness(projected);
|
|
30078
|
+
} else {
|
|
30079
|
+
detail = `${projected}, and every field it names exists — a multi-select list ` + `(\`[A, B]\`) reads each entry against \`Data\` itself, so on a list ` + `result use \`[].[A, B]\` or \`[].{a: A, b: B}\` to read the records`;
|
|
30080
|
+
}
|
|
30081
|
+
} else if (outcome.kind === "null-rows") {
|
|
30082
|
+
lede = "returned only null values";
|
|
30083
|
+
const projected = `every value it projected is null on all ${outcome.count} row(s)`;
|
|
30084
|
+
detail = unknown.length > 0 ? `${projected}, because ${isNotAField(unknown)}` : withSoundness(projected);
|
|
30085
|
+
} else if (outcome.kind === "null-values") {
|
|
30086
|
+
lede = "returned only null values";
|
|
30087
|
+
const projected = `every key it projected (${nameList(outcome.keys)}) is null`;
|
|
30088
|
+
const sameSet = unknown.length === outcome.keys.length && outcome.keys.every((k) => unknown.includes(k));
|
|
30089
|
+
if (sameSet) {
|
|
30090
|
+
detail = `${isNotAField(outcome.keys)}, so every key it projected is null`;
|
|
30091
|
+
} else if (unknown.length > 0) {
|
|
30092
|
+
detail = `${projected}, because ${isNotAField(unknown)}`;
|
|
30093
|
+
} else {
|
|
30094
|
+
detail = withSoundness(`${projected} on all ${scope}`);
|
|
30095
|
+
}
|
|
30096
|
+
} else {
|
|
30097
|
+
lede = "returned nothing";
|
|
30098
|
+
if (unknown.length > 0) {
|
|
30099
|
+
detail = isNotAField(unknown);
|
|
30100
|
+
} else {
|
|
30101
|
+
const selection = refs.hasPredicate ? "no record matched" : "the expression resolved to no value";
|
|
30102
|
+
detail = withSoundness(`${selection} — it read ${scope}`);
|
|
30103
|
+
}
|
|
30104
|
+
}
|
|
30105
|
+
const fields = present.length > 0 ? ` Available fields: ${nameList(present)}.` : "";
|
|
30106
|
+
return `--output-filter ${JSON.stringify(filter)} ${lede}: ${detail}.${fields}`;
|
|
30107
|
+
}
|
|
30108
|
+
function appendWarning(existing, note) {
|
|
30109
|
+
return existing ? `${existing} ${note}` : note;
|
|
30110
|
+
}
|
|
30111
|
+
function applyFilter(data, filter, onWarning) {
|
|
29953
30112
|
const codec = requireJmespath();
|
|
29954
30113
|
let result;
|
|
29955
30114
|
try {
|
|
@@ -29957,9 +30116,34 @@ function applyFilter(data, filter) {
|
|
|
29957
30116
|
} catch (err) {
|
|
29958
30117
|
throw new FilterEvaluationError(filter, err);
|
|
29959
30118
|
}
|
|
29960
|
-
|
|
30119
|
+
const inputCount = countRecords(data);
|
|
30120
|
+
const warn = (outcome) => {
|
|
30121
|
+
if (inputCount === 0)
|
|
30122
|
+
return;
|
|
30123
|
+
const note = buildFilterWarning(filter, data, outcome);
|
|
30124
|
+
getOutputSink().writeErr(`[WARN] ${note}
|
|
30125
|
+
`);
|
|
30126
|
+
onWarning?.(note);
|
|
30127
|
+
};
|
|
30128
|
+
const warnIfAllNull = (records) => {
|
|
30129
|
+
const keys = alwaysNullKeys(records);
|
|
30130
|
+
if (keys.length > 0)
|
|
30131
|
+
warn({ kind: "null-values", keys });
|
|
30132
|
+
};
|
|
30133
|
+
if (result == null) {
|
|
30134
|
+
warn({ kind: "empty" });
|
|
29961
30135
|
return [];
|
|
30136
|
+
}
|
|
29962
30137
|
if (Array.isArray(result)) {
|
|
30138
|
+
if (result.length === 0) {
|
|
30139
|
+
warn({ kind: "empty" });
|
|
30140
|
+
} else if (result.every((entry) => entry === null)) {
|
|
30141
|
+
warn({ kind: "null-elements", count: result.length });
|
|
30142
|
+
} else if (result.every((entry) => Array.isArray(entry)) && carriesOnlyNulls(result)) {
|
|
30143
|
+
warn({ kind: "null-rows", count: result.length });
|
|
30144
|
+
} else {
|
|
30145
|
+
warnIfAllNull(result);
|
|
30146
|
+
}
|
|
29963
30147
|
if (result.length > 0 && typeof result[0] !== "object") {
|
|
29964
30148
|
const fieldMatch = filter.match(/\.(\w+)$/);
|
|
29965
30149
|
const key = fieldMatch ? fieldMatch[1] : "Value";
|
|
@@ -29967,10 +30151,30 @@ function applyFilter(data, filter) {
|
|
|
29967
30151
|
}
|
|
29968
30152
|
return result;
|
|
29969
30153
|
}
|
|
29970
|
-
if (typeof result === "object")
|
|
30154
|
+
if (typeof result === "object") {
|
|
30155
|
+
warnIfAllNull([result]);
|
|
29971
30156
|
return result;
|
|
30157
|
+
}
|
|
29972
30158
|
return { Value: result };
|
|
29973
30159
|
}
|
|
30160
|
+
function filterFailureData(envelope) {
|
|
30161
|
+
const filter = getOutputFilter();
|
|
30162
|
+
const data = envelope.Data;
|
|
30163
|
+
if (!filter || data == null)
|
|
30164
|
+
return;
|
|
30165
|
+
let note;
|
|
30166
|
+
const [filterError, filtered] = catchError(() => applyFilter(data, filter, (n) => {
|
|
30167
|
+
note = n;
|
|
30168
|
+
}));
|
|
30169
|
+
if (filterError) {
|
|
30170
|
+
envelope.Warning = appendWarning(envelope.Warning, `--output-filter was not applied, so Data is shown in full: ${filterError.message}`);
|
|
30171
|
+
return;
|
|
30172
|
+
}
|
|
30173
|
+
envelope.Data = filtered;
|
|
30174
|
+
if (note) {
|
|
30175
|
+
envelope.Warning = appendWarning(envelope.Warning, note);
|
|
30176
|
+
}
|
|
30177
|
+
}
|
|
29974
30178
|
function defaultErrorCodeForResult(result) {
|
|
29975
30179
|
switch (result) {
|
|
29976
30180
|
case RESULTS.AuthenticationError:
|
|
@@ -30053,8 +30257,14 @@ var OutputFormatter;
|
|
|
30053
30257
|
}
|
|
30054
30258
|
const filter = getOutputFilter();
|
|
30055
30259
|
if (filter) {
|
|
30056
|
-
|
|
30260
|
+
let note;
|
|
30261
|
+
const filtered = applyFilter(data.Data, filter, (n) => {
|
|
30262
|
+
note = n;
|
|
30263
|
+
});
|
|
30057
30264
|
data.Data = normalize ? normalizeDataKeys(filtered, verbatim, subtrees && { refs: subtrees.refs, mode: "skip" }) : filtered;
|
|
30265
|
+
if (note) {
|
|
30266
|
+
data.Warning = appendWarning(data.Warning, note);
|
|
30267
|
+
}
|
|
30058
30268
|
}
|
|
30059
30269
|
logOutput(normalizeOutputKeys(data), getOutputFormat(), options?.tableRowStyle);
|
|
30060
30270
|
}
|
|
@@ -30082,6 +30292,7 @@ var OutputFormatter;
|
|
|
30082
30292
|
delete envelope.TelemetryErrorClass;
|
|
30083
30293
|
delete envelope.TelemetryTerminalOutcome;
|
|
30084
30294
|
delete envelope.TelemetryTerminalSignal;
|
|
30295
|
+
filterFailureData(envelope);
|
|
30085
30296
|
if (!suppressTelemetry) {
|
|
30086
30297
|
telemetry.trackEvent(CommonTelemetryEvents.Error, {
|
|
30087
30298
|
result: data.Result,
|
|
@@ -30130,13 +30341,20 @@ var OutputFormatter;
|
|
|
30130
30341
|
OutputFormatter.log = log;
|
|
30131
30342
|
function formatToString(data) {
|
|
30132
30343
|
const filter = getOutputFilter();
|
|
30344
|
+
const envelope = data;
|
|
30133
30345
|
if ("Data" in data && data.Data != null) {
|
|
30134
30346
|
data.Data = normalizeDataKeys(data.Data);
|
|
30135
30347
|
if (filter) {
|
|
30136
|
-
|
|
30348
|
+
let note;
|
|
30349
|
+
data.Data = normalizeDataKeys(applyFilter(data.Data, filter, (n) => {
|
|
30350
|
+
note = n;
|
|
30351
|
+
}));
|
|
30352
|
+
if (note) {
|
|
30353
|
+
envelope.Warning = appendWarning(envelope.Warning, note);
|
|
30354
|
+
}
|
|
30137
30355
|
}
|
|
30138
30356
|
}
|
|
30139
|
-
const output = normalizeOutputKeys(
|
|
30357
|
+
const output = normalizeOutputKeys(envelope);
|
|
30140
30358
|
const lines = [];
|
|
30141
30359
|
const sink = getOutputSink();
|
|
30142
30360
|
printOutput(output, getOutputFormat(), (msg) => {
|
|
@@ -32923,4 +33141,4 @@ Running workflow: ${fs2.path.basename(resolvedPath)}`);
|
|
|
32923
33141
|
|
|
32924
33142
|
export { getFileSystem, catchError, logger, RESULTS, SuccessOutput, FailureOutput, OutputFormatter, Command, processContext, registerPackageMetadataOptions, mapPackageMetadataOptions, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, unsupportedSolutionProjectType, getLoginStatusAsync, getAuthContext, WorkflowRunService };
|
|
32925
33143
|
|
|
32926
|
-
//# debugId=
|
|
33144
|
+
//# debugId=8C40165645DEE29A64756E2164756E21
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
processContext,
|
|
20
20
|
registerPackageMetadataOptions,
|
|
21
21
|
unsupportedSolutionProjectType
|
|
22
|
-
} from "./packager-tool-
|
|
22
|
+
} from "./packager-tool-dqnnvzg1.js";
|
|
23
23
|
import {
|
|
24
24
|
yaml
|
|
25
25
|
} from "./packager-tool-d3w0wn6k.js";
|
|
@@ -7155,7 +7155,7 @@ var require__2020 = __commonJS(function(exports, module) {
|
|
|
7155
7155
|
var package_default = {
|
|
7156
7156
|
name: "@uipath/api-workflow-tool",
|
|
7157
7157
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
7158
|
-
version: "1.202.1-preview.
|
|
7158
|
+
version: "1.202.1-preview.238",
|
|
7159
7159
|
description: "Run UiPath API Workflows locally.",
|
|
7160
7160
|
private: false,
|
|
7161
7161
|
repository: {
|
|
@@ -7738,7 +7738,7 @@ class TextApiResponse {
|
|
|
7738
7738
|
var package_default2 = {
|
|
7739
7739
|
name: "@uipath/integrationservice-sdk",
|
|
7740
7740
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
7741
|
-
version: "1.202.1-preview.
|
|
7741
|
+
version: "1.202.1-preview.238",
|
|
7742
7742
|
repository: {
|
|
7743
7743
|
type: "git",
|
|
7744
7744
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -14370,7 +14370,7 @@ Subcommands:
|
|
|
14370
14370
|
// src/commands/packager-shared.ts
|
|
14371
14371
|
async function createPackager() {
|
|
14372
14372
|
registerPackagerFactories();
|
|
14373
|
-
const { createNodeProjectPackager } = await import("./node-
|
|
14373
|
+
const { createNodeProjectPackager } = await import("./node-gfj12t7t.js");
|
|
14374
14374
|
return await createNodeProjectPackager({
|
|
14375
14375
|
logHandler: logger.handleLog
|
|
14376
14376
|
});
|
|
@@ -14393,7 +14393,7 @@ async function setupProject(packager, projectPath) {
|
|
|
14393
14393
|
return packager.setupAsync(absPath);
|
|
14394
14394
|
}
|
|
14395
14395
|
async function buildBaseOptions() {
|
|
14396
|
-
const { ProjectPackOptions } = await import("./index-
|
|
14396
|
+
const { ProjectPackOptions } = await import("./index-wmwh4a4m.js");
|
|
14397
14397
|
const sdkLogLevelMap = {
|
|
14398
14398
|
[0 /* DEBUG */]: "Debug" /* Debug */,
|
|
14399
14399
|
[1 /* INFO */]: "Information" /* Info */,
|
|
@@ -14689,7 +14689,7 @@ function querystringSingleKey3(key, value, keyPrefix = "") {
|
|
|
14689
14689
|
var package_default3 = {
|
|
14690
14690
|
name: "@uipath/solution-sdk",
|
|
14691
14691
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
14692
|
-
version: "1.202.1-preview.
|
|
14692
|
+
version: "1.202.1-preview.238",
|
|
14693
14693
|
repository: {
|
|
14694
14694
|
type: "git",
|
|
14695
14695
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -16886,4 +16886,4 @@ var registerCommands = async (program) => {
|
|
|
16886
16886
|
|
|
16887
16887
|
export { metadata, registerCommands };
|
|
16888
16888
|
|
|
16889
|
-
//# debugId=
|
|
16889
|
+
//# debugId=71BA91DC40D21DAC64756E2164756E21
|
package/dist/tool.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
metadata,
|
|
3
3
|
registerCommands
|
|
4
|
-
} from "./packager-tool-
|
|
4
|
+
} from "./packager-tool-m49btj1h.js";
|
|
5
5
|
import"./packager-tool-m6ddy2t4.js";
|
|
6
6
|
import"./packager-tool-4vt21dnn.js";
|
|
7
|
-
import"./packager-tool-
|
|
7
|
+
import"./packager-tool-dqnnvzg1.js";
|
|
8
8
|
import"./packager-tool-d3w0wn6k.js";
|
|
9
9
|
import"./packager-tool-1de529jm.js";
|
|
10
10
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/api-workflow-tool",
|
|
3
3
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
4
|
-
"version": "1.202.1-preview.
|
|
4
|
+
"version": "1.202.1-preview.238",
|
|
5
5
|
"description": "Run UiPath API Workflows locally.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "537e43df1d3583633cfd3a0b88634f9ce3ba9d6b"
|
|
29
29
|
}
|