@uipath/tasks-tool 1.201.0-preview.115 → 1.201.0-preview.121

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 (40) hide show
  1. package/browser.json +2 -1
  2. package/dist/folder-picker-interactive-2kj361mt.js +1850 -0
  3. package/dist/folder-resolver-htdmzdhy.js +92 -0
  4. package/dist/index.js +5 -3
  5. package/dist/tool-0n9mj887.js +2448 -0
  6. package/dist/tool-rsk1xt86.js +6026 -0
  7. package/dist/{tool-vw6gha5d.js → tool-ww671age.js} +7469 -10469
  8. package/dist/tool.js +3 -2
  9. package/package.json +2 -2
  10. package/src/commands/_shared/catalog-options.spec.ts +114 -0
  11. package/src/commands/_shared/catalog-options.ts +122 -0
  12. package/src/commands/_shared/connect.spec.ts +52 -0
  13. package/src/commands/_shared/connect.ts +31 -0
  14. package/src/commands/_shared/constants.ts +1 -0
  15. package/src/commands/_shared/folder-picker-interactive.spec.ts +92 -0
  16. package/src/commands/_shared/folder-picker-interactive.ts +76 -0
  17. package/src/commands/_shared/folder-picker.spec.ts +159 -0
  18. package/src/commands/_shared/folder-picker.ts +113 -0
  19. package/src/commands/_shared/folder-resolver.spec.ts +152 -0
  20. package/src/commands/_shared/folder-resolver.ts +113 -0
  21. package/src/commands/_shared/parse.spec.ts +69 -0
  22. package/src/commands/_shared/parse.ts +43 -0
  23. package/src/commands/catalogs.ts +277 -0
  24. package/src/commands/comments.ts +160 -0
  25. package/src/commands/data.ts +137 -0
  26. package/src/commands/labels.ts +93 -0
  27. package/src/commands/metadata.ts +139 -0
  28. package/src/commands/tasks.spec.ts +1557 -2
  29. package/src/commands/tasks.ts +191 -280
  30. package/src/tool.ts +10 -0
  31. package/src/utils/sdk-client.ts +5 -0
  32. package/tests/assignable-users.e2e.test.ts +58 -4
  33. package/tests/catalogs.e2e.test.ts +393 -0
  34. package/tests/comments.e2e.test.ts +223 -0
  35. package/tests/complete.e2e.test.ts +9 -9
  36. package/tests/data.e2e.test.ts +187 -0
  37. package/tests/get.e2e.test.ts +4 -2
  38. package/tests/labels.e2e.test.ts +184 -0
  39. package/tests/list.e2e.test.ts +110 -0
  40. package/tests/metadata.e2e.test.ts +186 -0
@@ -0,0 +1,92 @@
1
+ import {
2
+ resolveFolder
3
+ } from "./tool-0n9mj887.js";
4
+ import {
5
+ OutputFormatter,
6
+ RESULTS,
7
+ catchError,
8
+ extractErrorMessage,
9
+ isGuid,
10
+ processContext
11
+ } from "./tool-rsk1xt86.js";
12
+ import"./tool-9qecd4wb.js";
13
+ import"./tool-7eva0peq.js";
14
+ import"./tool-5arsyj36.js";
15
+ import"./tool-0v6na3yp.js";
16
+
17
+ // src/commands/_shared/folder-resolver.ts
18
+ var FOLDER_LOOKUP_HINT = "Run 'uip or folders list' to see the folders you can access.";
19
+ function isFolderInputError(error) {
20
+ if (!(error instanceof Error))
21
+ return false;
22
+ if ("response" in error)
23
+ return false;
24
+ if (error.name === "FetchError")
25
+ return false;
26
+ return true;
27
+ }
28
+ async function reportResolutionFailure(scope, error) {
29
+ if (isFolderInputError(error)) {
30
+ OutputFormatter.error({
31
+ Result: RESULTS.Failure,
32
+ Message: error.message,
33
+ Instructions: FOLDER_LOOKUP_HINT
34
+ });
35
+ } else {
36
+ OutputFormatter.error({
37
+ Result: RESULTS.Failure,
38
+ Message: `Error resolving ${scope}`,
39
+ Instructions: `${await extractErrorMessage(error)} ${FOLDER_LOOKUP_HINT}`
40
+ });
41
+ }
42
+ processContext.exit(1);
43
+ }
44
+ async function resolveFolderIdByKey(folderKey, tenant) {
45
+ if (!isGuid(folderKey)) {
46
+ OutputFormatter.error({
47
+ Result: RESULTS.Failure,
48
+ Message: `Invalid --folder-key: ${folderKey}`,
49
+ Instructions: "Expected a UUID (e.g. '12345678-1234-1234-1234-123456789abc')."
50
+ });
51
+ processContext.exit(1);
52
+ return null;
53
+ }
54
+ const [error, folder] = await catchError(resolveFolder({ folderKey }, { tenant }));
55
+ if (error) {
56
+ await reportResolutionFailure(`folder key '${folderKey}'`, error);
57
+ return null;
58
+ }
59
+ if (folder?.id == null) {
60
+ OutputFormatter.error({
61
+ Result: RESULTS.Failure,
62
+ Message: `Folder not found: '${folderKey}'.`,
63
+ Instructions: FOLDER_LOOKUP_HINT
64
+ });
65
+ processContext.exit(1);
66
+ return null;
67
+ }
68
+ return folder.id;
69
+ }
70
+ async function resolveFolderIdByPath(folderPath, tenant) {
71
+ const [error, folder] = await catchError(resolveFolder({ folderPath }, { tenant }));
72
+ if (error) {
73
+ await reportResolutionFailure(`folder path '${folderPath}'`, error);
74
+ return null;
75
+ }
76
+ if (folder?.id == null) {
77
+ OutputFormatter.error({
78
+ Result: RESULTS.Failure,
79
+ Message: `Folder not found: '${folderPath}'.`,
80
+ Instructions: FOLDER_LOOKUP_HINT
81
+ });
82
+ processContext.exit(1);
83
+ return null;
84
+ }
85
+ return folder.id;
86
+ }
87
+ export {
88
+ resolveFolderIdByPath,
89
+ resolveFolderIdByKey
90
+ };
91
+
92
+ //# debugId=72DBF4BC98A7E41A64756E2164756E21
package/dist/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env bun
2
2
  import {
3
- Command,
4
3
  metadata,
5
4
  registerCommands
6
- } from "./tool-vw6gha5d.js";
5
+ } from "./tool-ww671age.js";
6
+ import {
7
+ Command
8
+ } from "./tool-rsk1xt86.js";
7
9
  import"./tool-9qecd4wb.js";
8
10
  import"./tool-7eva0peq.js";
9
11
  import"./tool-5arsyj36.js";
@@ -16,4 +18,4 @@ program.name(metadata.name).description(metadata.description).version(metadata.v
16
18
  await registerCommands(program);
17
19
  await program.parseAsync(process.argv);
18
20
 
19
- //# debugId=37243AA243C065B064756E2164756E21
21
+ //# debugId=C599CFC1748992D664756E2164756E21