@uipath/solution-tool 1.203.0-preview.235 → 1.203.0-preview.237

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.
Files changed (28) hide show
  1. package/dist/deploy.js +6 -6
  2. package/dist/index.js +15 -15
  3. package/dist/init.js +5 -5
  4. package/dist/{list-q4e119rz.js → list-cygw4ays.js} +4 -4
  5. package/dist/pack.js +8 -8
  6. package/dist/{packager-tool-3jrq7smt.js → packager-tool-371g7ncz.js} +1 -1
  7. package/dist/{packager-tool-znakt6yw.js → packager-tool-4en00krn.js} +3 -3
  8. package/dist/{packager-tool-vas0xg5h.js → packager-tool-51yv0h9t.js} +1 -1
  9. package/dist/{packager-tool-mv5gp9ky.js → packager-tool-6nsq0bgx.js} +4 -4
  10. package/dist/{packager-tool-6rjchfr3.js → packager-tool-8qxbvd8p.js} +22 -22
  11. package/dist/{packager-tool-t83y1kt2.js → packager-tool-ad7cjqbr.js} +4 -4
  12. package/dist/{packager-tool-0f0wt9vh.js → packager-tool-bv7p4xrf.js} +224 -7
  13. package/dist/{packager-tool-y97kpjr2.js → packager-tool-e36v866n.js} +453 -19
  14. package/dist/{packager-tool-7cyeqva9.js → packager-tool-fdptqx2c.js} +4 -4
  15. package/dist/{packager-tool-k4mskzww.js → packager-tool-hmg4h4be.js} +1 -1
  16. package/dist/{packager-tool-2syrt51a.js → packager-tool-ptqqaxz4.js} +2 -2
  17. package/dist/{packager-tool-1haahq17.js → packager-tool-q2tzz45h.js} +2 -2
  18. package/dist/{packager-tool-resolver-fmjr60x8.js → packager-tool-resolver-jzjgh1vx.js} +2 -2
  19. package/dist/{packager-tool-bkwnetqn.js → packager-tool-rmqfg1cb.js} +3 -3
  20. package/dist/{packager-tool-hwec9y8p.js → packager-tool-tb88r1tz.js} +4 -4
  21. package/dist/{packager-tool-7znqtw3f.js → packager-tool-wyztfanh.js} +4 -4
  22. package/dist/{prepare-solution-resources-wds3r8bq.js → prepare-solution-resources-0ms8dtg3.js} +7 -7
  23. package/dist/{project-contributions-cvttys34.js → project-contributions-jatm7p1p.js} +6 -6
  24. package/dist/publish.js +6 -6
  25. package/dist/resource.js +4 -4
  26. package/dist/templates/AGENTS.md +5 -2
  27. package/dist/tool.js +15 -15
  28. package/package.json +2 -2
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  prepareSolutionResources
3
- } from "./packager-tool-7znqtw3f.js";
3
+ } from "./packager-tool-wyztfanh.js";
4
4
  import {
5
5
  ensurePackagerTools,
6
6
  isUnpackableProjectTypeError
7
- } from "./packager-tool-k4mskzww.js";
7
+ } from "./packager-tool-hmg4h4be.js";
8
8
  import {
9
9
  BuildConfiguration,
10
10
  I18nManager,
@@ -26,7 +26,7 @@ import {
26
26
  } from "./packager-tool-nzghfa48.js";
27
27
  import {
28
28
  getLoginStatusAsync
29
- } from "./packager-tool-3jrq7smt.js";
29
+ } from "./packager-tool-371g7ncz.js";
30
30
  import {
31
31
  OutputFormatter,
32
32
  RESULTS,
@@ -36,7 +36,7 @@ import {
36
36
  getFileSystem,
37
37
  logger,
38
38
  telemetry
39
- } from "./packager-tool-0f0wt9vh.js";
39
+ } from "./packager-tool-bv7p4xrf.js";
40
40
 
41
41
  // ../filesystem/dist/index.js
42
42
  import fs from "node:fs";
@@ -25863,7 +25863,7 @@ var package_default = {
25863
25863
  name: "@uipath/project-packager",
25864
25864
  author: "UiPath",
25865
25865
  license: "SEE LICENSE IN LICENSE.txt",
25866
- version: "1.203.0-preview.235",
25866
+ version: "1.203.0-preview.237",
25867
25867
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
25868
25868
  type: "module",
25869
25869
  main: "./dist/index.js",
@@ -37742,7 +37742,165 @@ class FilterImplicitLimitError extends Error {
37742
37742
  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).";
37743
37743
  }
37744
37744
  }
37745
- function applyFilter(data, filter) {
37745
+ function countRecords(data) {
37746
+ if (Array.isArray(data))
37747
+ return data.length;
37748
+ return data == null ? 0 : 1;
37749
+ }
37750
+ function availableFields(data) {
37751
+ const records = Array.isArray(data) ? data : [data];
37752
+ const keys = new Set;
37753
+ for (const record of records) {
37754
+ if (record && typeof record === "object" && !Array.isArray(record)) {
37755
+ for (const key of Object.keys(record))
37756
+ keys.add(key);
37757
+ }
37758
+ }
37759
+ return [...keys];
37760
+ }
37761
+ function decodeQuotedIdentifier(whole, inner) {
37762
+ const [error, decoded] = catchError3(() => JSON.parse(whole));
37763
+ if (!error && typeof decoded === "string")
37764
+ return decoded;
37765
+ return inner.replace(/\\(.)/g, "$1");
37766
+ }
37767
+ function referencedFields(filter) {
37768
+ const top = new Set;
37769
+ const nested = new Set;
37770
+ const withoutValueLiterals = filter.replace(/'(?:\\.|[^'\\])*'/g, " ").replace(/`(?:\\.|[^`\\])*`/g, " ");
37771
+ const isPathTail = (text, index) => text[index - 1] === "." && /[A-Za-z0-9_"]/.test(text[index - 2] ?? "");
37772
+ const quoted = [];
37773
+ const withoutLiterals = withoutValueLiterals.replace(/"((?:\\.|[^"\\])*)"/g, (whole, name, index) => {
37774
+ const isAlias = /^\s*:/.test(withoutValueLiterals.slice(index + whole.length));
37775
+ if (!isAlias) {
37776
+ quoted.push({
37777
+ name: decodeQuotedIdentifier(whole, name),
37778
+ index,
37779
+ tail: isPathTail(withoutValueLiterals, index)
37780
+ });
37781
+ }
37782
+ return `"${" ".repeat(whole.length - 2)}"`;
37783
+ });
37784
+ const descent = /[A-Za-z0-9_"]\s*[.[]/.exec(withoutLiterals);
37785
+ const rootEnd = descent ? descent.index + 1 : Number.POSITIVE_INFINITY;
37786
+ const place = (name, index, tail) => {
37787
+ if (tail || index >= rootEnd)
37788
+ nested.add(name);
37789
+ else
37790
+ top.add(name);
37791
+ };
37792
+ for (const entry of quoted)
37793
+ place(entry.name, entry.index, entry.tail);
37794
+ const identifiers = withoutLiterals.matchAll(/([A-Za-z_][A-Za-z0-9_]*)(\s*[:(])?/g);
37795
+ const reserved = new Set(["true", "false", "null", "and", "or", "not"]);
37796
+ for (const match of identifiers) {
37797
+ const [, name, trailing] = match;
37798
+ if (trailing || reserved.has(name))
37799
+ continue;
37800
+ place(name, match.index, isPathTail(withoutLiterals, match.index));
37801
+ }
37802
+ return {
37803
+ top: [...top],
37804
+ nested: [...nested].filter((name) => !top.has(name)),
37805
+ hasPredicate: /\[\s*\?/.test(withoutValueLiterals)
37806
+ };
37807
+ }
37808
+ function appearsBelowTopLevel(data, name) {
37809
+ let budget = 2000;
37810
+ const visit = (value, depth) => {
37811
+ if (budget-- <= 0 || depth > 4)
37812
+ return false;
37813
+ if (value === null || typeof value !== "object")
37814
+ return false;
37815
+ if (Array.isArray(value))
37816
+ return value.some((entry) => visit(entry, depth));
37817
+ const record = value;
37818
+ if (depth > 0 && Object.hasOwn(record, name))
37819
+ return true;
37820
+ return Object.values(record).some((entry) => visit(entry, depth + 1));
37821
+ };
37822
+ return visit(data, 0);
37823
+ }
37824
+ function alwaysNullKeys(records) {
37825
+ const objects = records.filter((r) => r != null && typeof r === "object" && !Array.isArray(r));
37826
+ if (objects.length === 0 || objects.length !== records.length)
37827
+ return [];
37828
+ const keys = [...new Set(objects.flatMap((o) => Object.keys(o)))];
37829
+ if (keys.length === 0)
37830
+ return [];
37831
+ const nullKeys = keys.filter((key) => objects.every((record) => record[key] === null));
37832
+ return nullKeys.length === keys.length ? nullKeys : [];
37833
+ }
37834
+ function carriesOnlyNulls(value) {
37835
+ if (value === null)
37836
+ return true;
37837
+ if (Array.isArray(value)) {
37838
+ return value.length > 0 && value.every(carriesOnlyNulls);
37839
+ }
37840
+ if (typeof value === "object" && value !== undefined) {
37841
+ const values = Object.values(value);
37842
+ return values.length > 0 && values.every(carriesOnlyNulls);
37843
+ }
37844
+ return false;
37845
+ }
37846
+ function nameList(names, cap22 = 12) {
37847
+ const shown = names.slice(0, cap22).map((n) => `\`${n}\``);
37848
+ const rest = names.length - shown.length;
37849
+ return shown.join(", ") + (rest > 0 ? `, and ${rest} more` : "");
37850
+ }
37851
+ function buildFilterWarning(filter, data, outcome) {
37852
+ const present = availableFields(data);
37853
+ const refs = referencedFields(filter);
37854
+ const unknown2 = refs.top.filter((name) => !present.includes(name) && !appearsBelowTopLevel(data, name));
37855
+ const unchecked = refs.nested.filter((name) => !present.includes(name));
37856
+ const count = countRecords(data);
37857
+ const scope = `${count} record(s)`;
37858
+ const isNotAField = (names) => `${nameList(names)} ${names.length === 1 ? "is not a field" : "are not fields"} on the ${scope} it read`;
37859
+ 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" : "";
37860
+ const withSoundness = (base) => soundness ? `${base}, and ${soundness}` : base;
37861
+ let detail;
37862
+ let lede;
37863
+ if (outcome.kind === "null-elements") {
37864
+ lede = "returned only null values";
37865
+ const projected = `all ${outcome.count} of the elements it projected are null`;
37866
+ if (unknown2.length > 0) {
37867
+ detail = `${projected}, because ${isNotAField(unknown2)}`;
37868
+ } else if (unchecked.length > 0) {
37869
+ detail = withSoundness(projected);
37870
+ } else {
37871
+ 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`;
37872
+ }
37873
+ } else if (outcome.kind === "null-rows") {
37874
+ lede = "returned only null values";
37875
+ const projected = `every value it projected is null on all ${outcome.count} row(s)`;
37876
+ detail = unknown2.length > 0 ? `${projected}, because ${isNotAField(unknown2)}` : withSoundness(projected);
37877
+ } else if (outcome.kind === "null-values") {
37878
+ lede = "returned only null values";
37879
+ const projected = `every key it projected (${nameList(outcome.keys)}) is null`;
37880
+ const sameSet = unknown2.length === outcome.keys.length && outcome.keys.every((k) => unknown2.includes(k));
37881
+ if (sameSet) {
37882
+ detail = `${isNotAField(outcome.keys)}, so every key it projected is null`;
37883
+ } else if (unknown2.length > 0) {
37884
+ detail = `${projected}, because ${isNotAField(unknown2)}`;
37885
+ } else {
37886
+ detail = withSoundness(`${projected} on all ${scope}`);
37887
+ }
37888
+ } else {
37889
+ lede = "returned nothing";
37890
+ if (unknown2.length > 0) {
37891
+ detail = isNotAField(unknown2);
37892
+ } else {
37893
+ const selection = refs.hasPredicate ? "no record matched" : "the expression resolved to no value";
37894
+ detail = withSoundness(`${selection} — it read ${scope}`);
37895
+ }
37896
+ }
37897
+ const fields = present.length > 0 ? ` Available fields: ${nameList(present)}.` : "";
37898
+ return `--output-filter ${JSON.stringify(filter)} ${lede}: ${detail}.${fields}`;
37899
+ }
37900
+ function appendWarning(existing, note) {
37901
+ return existing ? `${existing} ${note}` : note;
37902
+ }
37903
+ function applyFilter(data, filter, onWarning) {
37746
37904
  const codec = requireJmespath();
37747
37905
  let result;
37748
37906
  try {
@@ -37750,9 +37908,34 @@ function applyFilter(data, filter) {
37750
37908
  } catch (err) {
37751
37909
  throw new FilterEvaluationError(filter, err);
37752
37910
  }
37753
- if (result == null)
37911
+ const inputCount = countRecords(data);
37912
+ const warn = (outcome) => {
37913
+ if (inputCount === 0)
37914
+ return;
37915
+ const note = buildFilterWarning(filter, data, outcome);
37916
+ getOutputSink2().writeErr(`[WARN] ${note}
37917
+ `);
37918
+ onWarning?.(note);
37919
+ };
37920
+ const warnIfAllNull = (records) => {
37921
+ const keys = alwaysNullKeys(records);
37922
+ if (keys.length > 0)
37923
+ warn({ kind: "null-values", keys });
37924
+ };
37925
+ if (result == null) {
37926
+ warn({ kind: "empty" });
37754
37927
  return [];
37928
+ }
37755
37929
  if (Array.isArray(result)) {
37930
+ if (result.length === 0) {
37931
+ warn({ kind: "empty" });
37932
+ } else if (result.every((entry) => entry === null)) {
37933
+ warn({ kind: "null-elements", count: result.length });
37934
+ } else if (result.every((entry) => Array.isArray(entry)) && carriesOnlyNulls(result)) {
37935
+ warn({ kind: "null-rows", count: result.length });
37936
+ } else {
37937
+ warnIfAllNull(result);
37938
+ }
37756
37939
  if (result.length > 0 && typeof result[0] !== "object") {
37757
37940
  const fieldMatch = filter.match(/\.(\w+)$/);
37758
37941
  const key = fieldMatch ? fieldMatch[1] : "Value";
@@ -37760,10 +37943,30 @@ function applyFilter(data, filter) {
37760
37943
  }
37761
37944
  return result;
37762
37945
  }
37763
- if (typeof result === "object")
37946
+ if (typeof result === "object") {
37947
+ warnIfAllNull([result]);
37764
37948
  return result;
37949
+ }
37765
37950
  return { Value: result };
37766
37951
  }
37952
+ function filterFailureData(envelope) {
37953
+ const filter = getOutputFilter();
37954
+ const data = envelope.Data;
37955
+ if (!filter || data == null)
37956
+ return;
37957
+ let note;
37958
+ const [filterError, filtered] = catchError3(() => applyFilter(data, filter, (n) => {
37959
+ note = n;
37960
+ }));
37961
+ if (filterError) {
37962
+ envelope.Warning = appendWarning(envelope.Warning, `--output-filter was not applied, so Data is shown in full: ${filterError.message}`);
37963
+ return;
37964
+ }
37965
+ envelope.Data = filtered;
37966
+ if (note) {
37967
+ envelope.Warning = appendWarning(envelope.Warning, note);
37968
+ }
37969
+ }
37767
37970
  function defaultErrorCodeForResult(result) {
37768
37971
  switch (result) {
37769
37972
  case RESULTS2.AuthenticationError:
@@ -37846,8 +38049,14 @@ var OutputFormatter2;
37846
38049
  }
37847
38050
  const filter = getOutputFilter();
37848
38051
  if (filter) {
37849
- const filtered = applyFilter(data.Data, filter);
38052
+ let note;
38053
+ const filtered = applyFilter(data.Data, filter, (n) => {
38054
+ note = n;
38055
+ });
37850
38056
  data.Data = normalize2 ? normalizeDataKeys(filtered, verbatim, subtrees && { refs: subtrees.refs, mode: "skip" }) : filtered;
38057
+ if (note) {
38058
+ data.Warning = appendWarning(data.Warning, note);
38059
+ }
37851
38060
  }
37852
38061
  logOutput(normalizeOutputKeys(data), getOutputFormat(), options?.tableRowStyle);
37853
38062
  }
@@ -37875,6 +38084,7 @@ var OutputFormatter2;
37875
38084
  delete envelope.TelemetryErrorClass;
37876
38085
  delete envelope.TelemetryTerminalOutcome;
37877
38086
  delete envelope.TelemetryTerminalSignal;
38087
+ filterFailureData(envelope);
37878
38088
  if (!suppressTelemetry) {
37879
38089
  telemetry2.trackEvent(CommonTelemetryEvents.Error, {
37880
38090
  result: data.Result,
@@ -37923,13 +38133,20 @@ var OutputFormatter2;
37923
38133
  OutputFormatter22.log = log2;
37924
38134
  function formatToString(data) {
37925
38135
  const filter = getOutputFilter();
38136
+ const envelope = data;
37926
38137
  if ("Data" in data && data.Data != null) {
37927
38138
  data.Data = normalizeDataKeys(data.Data);
37928
38139
  if (filter) {
37929
- data.Data = normalizeDataKeys(applyFilter(data.Data, filter));
38140
+ let note;
38141
+ data.Data = normalizeDataKeys(applyFilter(data.Data, filter, (n) => {
38142
+ note = n;
38143
+ }));
38144
+ if (note) {
38145
+ envelope.Warning = appendWarning(envelope.Warning, note);
38146
+ }
37930
38147
  }
37931
38148
  }
37932
- const output = normalizeOutputKeys(data);
38149
+ const output = normalizeOutputKeys(envelope);
37933
38150
  const lines = [];
37934
38151
  const sink = getOutputSink2();
37935
38152
  printOutput(output, getOutputFormat(), (msg) => {
@@ -39051,7 +39268,7 @@ var package_default2 = {
39051
39268
  name: "@uipath/project-packager",
39052
39269
  author: "UiPath",
39053
39270
  license: "SEE LICENSE IN LICENSE.txt",
39054
- version: "1.203.0-preview.235",
39271
+ version: "1.203.0-preview.237",
39055
39272
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
39056
39273
  type: "module",
39057
39274
  main: "./dist/index.js",
@@ -49071,7 +49288,165 @@ class FilterImplicitLimitError2 extends Error {
49071
49288
  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).";
49072
49289
  }
49073
49290
  }
49074
- function applyFilter2(data, filter) {
49291
+ function countRecords2(data) {
49292
+ if (Array.isArray(data))
49293
+ return data.length;
49294
+ return data == null ? 0 : 1;
49295
+ }
49296
+ function availableFields2(data) {
49297
+ const records = Array.isArray(data) ? data : [data];
49298
+ const keys = new Set;
49299
+ for (const record of records) {
49300
+ if (record && typeof record === "object" && !Array.isArray(record)) {
49301
+ for (const key of Object.keys(record))
49302
+ keys.add(key);
49303
+ }
49304
+ }
49305
+ return [...keys];
49306
+ }
49307
+ function decodeQuotedIdentifier2(whole, inner) {
49308
+ const [error, decoded] = catchError4(() => JSON.parse(whole));
49309
+ if (!error && typeof decoded === "string")
49310
+ return decoded;
49311
+ return inner.replace(/\\(.)/g, "$1");
49312
+ }
49313
+ function referencedFields2(filter) {
49314
+ const top = new Set;
49315
+ const nested = new Set;
49316
+ const withoutValueLiterals = filter.replace(/'(?:\\.|[^'\\])*'/g, " ").replace(/`(?:\\.|[^`\\])*`/g, " ");
49317
+ const isPathTail = (text, index) => text[index - 1] === "." && /[A-Za-z0-9_"]/.test(text[index - 2] ?? "");
49318
+ const quoted = [];
49319
+ const withoutLiterals = withoutValueLiterals.replace(/"((?:\\.|[^"\\])*)"/g, (whole, name, index) => {
49320
+ const isAlias = /^\s*:/.test(withoutValueLiterals.slice(index + whole.length));
49321
+ if (!isAlias) {
49322
+ quoted.push({
49323
+ name: decodeQuotedIdentifier2(whole, name),
49324
+ index,
49325
+ tail: isPathTail(withoutValueLiterals, index)
49326
+ });
49327
+ }
49328
+ return `"${" ".repeat(whole.length - 2)}"`;
49329
+ });
49330
+ const descent = /[A-Za-z0-9_"]\s*[.[]/.exec(withoutLiterals);
49331
+ const rootEnd = descent ? descent.index + 1 : Number.POSITIVE_INFINITY;
49332
+ const place = (name, index, tail) => {
49333
+ if (tail || index >= rootEnd)
49334
+ nested.add(name);
49335
+ else
49336
+ top.add(name);
49337
+ };
49338
+ for (const entry of quoted)
49339
+ place(entry.name, entry.index, entry.tail);
49340
+ const identifiers = withoutLiterals.matchAll(/([A-Za-z_][A-Za-z0-9_]*)(\s*[:(])?/g);
49341
+ const reserved = new Set(["true", "false", "null", "and", "or", "not"]);
49342
+ for (const match of identifiers) {
49343
+ const [, name, trailing] = match;
49344
+ if (trailing || reserved.has(name))
49345
+ continue;
49346
+ place(name, match.index, isPathTail(withoutLiterals, match.index));
49347
+ }
49348
+ return {
49349
+ top: [...top],
49350
+ nested: [...nested].filter((name) => !top.has(name)),
49351
+ hasPredicate: /\[\s*\?/.test(withoutValueLiterals)
49352
+ };
49353
+ }
49354
+ function appearsBelowTopLevel2(data, name) {
49355
+ let budget = 2000;
49356
+ const visit = (value, depth) => {
49357
+ if (budget-- <= 0 || depth > 4)
49358
+ return false;
49359
+ if (value === null || typeof value !== "object")
49360
+ return false;
49361
+ if (Array.isArray(value))
49362
+ return value.some((entry) => visit(entry, depth));
49363
+ const record = value;
49364
+ if (depth > 0 && Object.hasOwn(record, name))
49365
+ return true;
49366
+ return Object.values(record).some((entry) => visit(entry, depth + 1));
49367
+ };
49368
+ return visit(data, 0);
49369
+ }
49370
+ function alwaysNullKeys2(records) {
49371
+ const objects = records.filter((r) => r != null && typeof r === "object" && !Array.isArray(r));
49372
+ if (objects.length === 0 || objects.length !== records.length)
49373
+ return [];
49374
+ const keys = [...new Set(objects.flatMap((o) => Object.keys(o)))];
49375
+ if (keys.length === 0)
49376
+ return [];
49377
+ const nullKeys = keys.filter((key) => objects.every((record) => record[key] === null));
49378
+ return nullKeys.length === keys.length ? nullKeys : [];
49379
+ }
49380
+ function carriesOnlyNulls2(value) {
49381
+ if (value === null)
49382
+ return true;
49383
+ if (Array.isArray(value)) {
49384
+ return value.length > 0 && value.every(carriesOnlyNulls2);
49385
+ }
49386
+ if (typeof value === "object" && value !== undefined) {
49387
+ const values = Object.values(value);
49388
+ return values.length > 0 && values.every(carriesOnlyNulls2);
49389
+ }
49390
+ return false;
49391
+ }
49392
+ function nameList2(names, cap22 = 12) {
49393
+ const shown = names.slice(0, cap22).map((n) => `\`${n}\``);
49394
+ const rest = names.length - shown.length;
49395
+ return shown.join(", ") + (rest > 0 ? `, and ${rest} more` : "");
49396
+ }
49397
+ function buildFilterWarning2(filter, data, outcome) {
49398
+ const present = availableFields2(data);
49399
+ const refs = referencedFields2(filter);
49400
+ const unknown2 = refs.top.filter((name) => !present.includes(name) && !appearsBelowTopLevel2(data, name));
49401
+ const unchecked = refs.nested.filter((name) => !present.includes(name));
49402
+ const count = countRecords2(data);
49403
+ const scope = `${count} record(s)`;
49404
+ const isNotAField = (names) => `${nameList2(names)} ${names.length === 1 ? "is not a field" : "are not fields"} on the ${scope} it read`;
49405
+ const soundness = unchecked.length > 0 ? `${nameList2(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" : "";
49406
+ const withSoundness = (base) => soundness ? `${base}, and ${soundness}` : base;
49407
+ let detail;
49408
+ let lede;
49409
+ if (outcome.kind === "null-elements") {
49410
+ lede = "returned only null values";
49411
+ const projected = `all ${outcome.count} of the elements it projected are null`;
49412
+ if (unknown2.length > 0) {
49413
+ detail = `${projected}, because ${isNotAField(unknown2)}`;
49414
+ } else if (unchecked.length > 0) {
49415
+ detail = withSoundness(projected);
49416
+ } else {
49417
+ 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`;
49418
+ }
49419
+ } else if (outcome.kind === "null-rows") {
49420
+ lede = "returned only null values";
49421
+ const projected = `every value it projected is null on all ${outcome.count} row(s)`;
49422
+ detail = unknown2.length > 0 ? `${projected}, because ${isNotAField(unknown2)}` : withSoundness(projected);
49423
+ } else if (outcome.kind === "null-values") {
49424
+ lede = "returned only null values";
49425
+ const projected = `every key it projected (${nameList2(outcome.keys)}) is null`;
49426
+ const sameSet = unknown2.length === outcome.keys.length && outcome.keys.every((k) => unknown2.includes(k));
49427
+ if (sameSet) {
49428
+ detail = `${isNotAField(outcome.keys)}, so every key it projected is null`;
49429
+ } else if (unknown2.length > 0) {
49430
+ detail = `${projected}, because ${isNotAField(unknown2)}`;
49431
+ } else {
49432
+ detail = withSoundness(`${projected} on all ${scope}`);
49433
+ }
49434
+ } else {
49435
+ lede = "returned nothing";
49436
+ if (unknown2.length > 0) {
49437
+ detail = isNotAField(unknown2);
49438
+ } else {
49439
+ const selection = refs.hasPredicate ? "no record matched" : "the expression resolved to no value";
49440
+ detail = withSoundness(`${selection} — it read ${scope}`);
49441
+ }
49442
+ }
49443
+ const fields = present.length > 0 ? ` Available fields: ${nameList2(present)}.` : "";
49444
+ return `--output-filter ${JSON.stringify(filter)} ${lede}: ${detail}.${fields}`;
49445
+ }
49446
+ function appendWarning2(existing, note) {
49447
+ return existing ? `${existing} ${note}` : note;
49448
+ }
49449
+ function applyFilter2(data, filter, onWarning) {
49075
49450
  const codec = requireJmespath2();
49076
49451
  let result;
49077
49452
  try {
@@ -49079,9 +49454,34 @@ function applyFilter2(data, filter) {
49079
49454
  } catch (err) {
49080
49455
  throw new FilterEvaluationError2(filter, err);
49081
49456
  }
49082
- if (result == null)
49457
+ const inputCount = countRecords2(data);
49458
+ const warn = (outcome) => {
49459
+ if (inputCount === 0)
49460
+ return;
49461
+ const note = buildFilterWarning2(filter, data, outcome);
49462
+ getOutputSink3().writeErr(`[WARN] ${note}
49463
+ `);
49464
+ onWarning?.(note);
49465
+ };
49466
+ const warnIfAllNull = (records) => {
49467
+ const keys = alwaysNullKeys2(records);
49468
+ if (keys.length > 0)
49469
+ warn({ kind: "null-values", keys });
49470
+ };
49471
+ if (result == null) {
49472
+ warn({ kind: "empty" });
49083
49473
  return [];
49474
+ }
49084
49475
  if (Array.isArray(result)) {
49476
+ if (result.length === 0) {
49477
+ warn({ kind: "empty" });
49478
+ } else if (result.every((entry) => entry === null)) {
49479
+ warn({ kind: "null-elements", count: result.length });
49480
+ } else if (result.every((entry) => Array.isArray(entry)) && carriesOnlyNulls2(result)) {
49481
+ warn({ kind: "null-rows", count: result.length });
49482
+ } else {
49483
+ warnIfAllNull(result);
49484
+ }
49085
49485
  if (result.length > 0 && typeof result[0] !== "object") {
49086
49486
  const fieldMatch = filter.match(/\.(\w+)$/);
49087
49487
  const key = fieldMatch ? fieldMatch[1] : "Value";
@@ -49089,10 +49489,30 @@ function applyFilter2(data, filter) {
49089
49489
  }
49090
49490
  return result;
49091
49491
  }
49092
- if (typeof result === "object")
49492
+ if (typeof result === "object") {
49493
+ warnIfAllNull([result]);
49093
49494
  return result;
49495
+ }
49094
49496
  return { Value: result };
49095
49497
  }
49498
+ function filterFailureData2(envelope) {
49499
+ const filter = getOutputFilter2();
49500
+ const data = envelope.Data;
49501
+ if (!filter || data == null)
49502
+ return;
49503
+ let note;
49504
+ const [filterError, filtered] = catchError4(() => applyFilter2(data, filter, (n) => {
49505
+ note = n;
49506
+ }));
49507
+ if (filterError) {
49508
+ envelope.Warning = appendWarning2(envelope.Warning, `--output-filter was not applied, so Data is shown in full: ${filterError.message}`);
49509
+ return;
49510
+ }
49511
+ envelope.Data = filtered;
49512
+ if (note) {
49513
+ envelope.Warning = appendWarning2(envelope.Warning, note);
49514
+ }
49515
+ }
49096
49516
  function defaultErrorCodeForResult2(result) {
49097
49517
  switch (result) {
49098
49518
  case RESULTS3.AuthenticationError:
@@ -49175,8 +49595,14 @@ var OutputFormatter3;
49175
49595
  }
49176
49596
  const filter = getOutputFilter2();
49177
49597
  if (filter) {
49178
- const filtered = applyFilter2(data.Data, filter);
49598
+ let note;
49599
+ const filtered = applyFilter2(data.Data, filter, (n) => {
49600
+ note = n;
49601
+ });
49179
49602
  data.Data = normalize2 ? normalizeDataKeys2(filtered, verbatim, subtrees && { refs: subtrees.refs, mode: "skip" }) : filtered;
49603
+ if (note) {
49604
+ data.Warning = appendWarning2(data.Warning, note);
49605
+ }
49180
49606
  }
49181
49607
  logOutput2(normalizeOutputKeys2(data), getOutputFormat2(), options?.tableRowStyle);
49182
49608
  }
@@ -49204,6 +49630,7 @@ var OutputFormatter3;
49204
49630
  delete envelope.TelemetryErrorClass;
49205
49631
  delete envelope.TelemetryTerminalOutcome;
49206
49632
  delete envelope.TelemetryTerminalSignal;
49633
+ filterFailureData2(envelope);
49207
49634
  if (!suppressTelemetry) {
49208
49635
  telemetry3.trackEvent(CommonTelemetryEvents2.Error, {
49209
49636
  result: data.Result,
@@ -49252,13 +49679,20 @@ var OutputFormatter3;
49252
49679
  OutputFormatter4.log = log2;
49253
49680
  function formatToString(data) {
49254
49681
  const filter = getOutputFilter2();
49682
+ const envelope = data;
49255
49683
  if ("Data" in data && data.Data != null) {
49256
49684
  data.Data = normalizeDataKeys2(data.Data);
49257
49685
  if (filter) {
49258
- data.Data = normalizeDataKeys2(applyFilter2(data.Data, filter));
49686
+ let note;
49687
+ data.Data = normalizeDataKeys2(applyFilter2(data.Data, filter, (n) => {
49688
+ note = n;
49689
+ }));
49690
+ if (note) {
49691
+ envelope.Warning = appendWarning2(envelope.Warning, note);
49692
+ }
49259
49693
  }
49260
49694
  }
49261
- const output = normalizeOutputKeys2(data);
49695
+ const output = normalizeOutputKeys2(envelope);
49262
49696
  const lines = [];
49263
49697
  const sink = getOutputSink3();
49264
49698
  printOutput2(output, getOutputFormat2(), (msg) => {
@@ -51957,4 +52391,4 @@ async function packSolutionAsync(solutionPath, options) {
51957
52391
 
51958
52392
  export { SolutionPackOptions, createSolutionPackager, readSolutionFileAsUint8Array, resolveSdkLogLevel, applyAuthConnection, SOLUTION_PATH_INSTRUCTIONS, checkSolutionPathAsync, GOVERNANCE_OPTION_INSTRUCTIONS, validateGovernanceOptions, PackCommandService, packSolutionAsync };
51959
52393
 
51960
- //# debugId=89DCF94854F651A564756E2164756E21
52394
+ //# debugId=8148F5B6A1AFF35064756E2164756E21
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  getAvailablePublishLocationsV2
3
- } from "./packager-tool-hwec9y8p.js";
3
+ } from "./packager-tool-tb88r1tz.js";
4
4
  import {
5
5
  PersonalWorkspacesApi,
6
6
  createOrchestratorConfig
7
- } from "./packager-tool-2syrt51a.js";
7
+ } from "./packager-tool-ptqqaxz4.js";
8
8
  import {
9
9
  getLoginStatusAsync
10
- } from "./packager-tool-3jrq7smt.js";
10
+ } from "./packager-tool-371g7ncz.js";
11
11
  import {
12
12
  getSdkUserAgentToken,
13
13
  installSdkUserAgentHeader
14
- } from "./packager-tool-0f0wt9vh.js";
14
+ } from "./packager-tool-bv7p4xrf.js";
15
15
 
16
16
  // ../pipelines-sdk/generated/src/runtime.ts
17
17
  var BASE_PATH = "https://alpha.uipath.com/uipattycyrhx/abizon_1/automationsolutions_".replace(/\/+$/, "");
@@ -9,7 +9,7 @@ import {
9
9
  ensurePackagerFactory,
10
10
  logger,
11
11
  unsupportedSolutionProjectType
12
- } from "./packager-tool-0f0wt9vh.js";
12
+ } from "./packager-tool-bv7p4xrf.js";
13
13
 
14
14
  // src/services/project-type-tools.ts
15
15
  var PROJECT_TYPE_TO_TOOL = new Map([
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getAuthContext
3
- } from "./packager-tool-3jrq7smt.js";
3
+ } from "./packager-tool-371g7ncz.js";
4
4
  import {
5
5
  addSdkUserAgentHeader,
6
6
  getSdkUserAgentToken,
7
7
  installSdkUserAgentHeader
8
- } from "./packager-tool-0f0wt9vh.js";
8
+ } from "./packager-tool-bv7p4xrf.js";
9
9
 
10
10
  // ../solution-sdk/src/solution-auth.ts
11
11
  async function getSolutionAuthContext(options) {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getAuthContext
3
- } from "./packager-tool-3jrq7smt.js";
3
+ } from "./packager-tool-371g7ncz.js";
4
4
  import {
5
5
  catchError
6
- } from "./packager-tool-0f0wt9vh.js";
6
+ } from "./packager-tool-bv7p4xrf.js";
7
7
 
8
8
  // src/services/studio-web-auth-middleware.ts
9
9
  var studioWebAuthByCommand = new WeakMap;
@@ -3,10 +3,10 @@ import {
3
3
  ensurePackagerTools,
4
4
  isUnpackableProjectTypeError,
5
5
  toolVerbForProjectType
6
- } from "./packager-tool-k4mskzww.js";
6
+ } from "./packager-tool-hmg4h4be.js";
7
7
  import"./packager-tool-jz2wbfjz.js";
8
8
  import"./packager-tool-nzghfa48.js";
9
- import"./packager-tool-0f0wt9vh.js";
9
+ import"./packager-tool-bv7p4xrf.js";
10
10
  import"./packager-tool-dfrk01gn.js";
11
11
  import"./packager-tool-1de529jm.js";
12
12
  export {